Click here to Skip to main content
Click here to Skip to main content

Binding DataSet and Generic *.rdlc Reports to a ReportViewer at Runtime

By , 25 Jul 2006
 

Introduction

In order to display a report by using ReportViewer Control, we need a DataSource that contains the data to be shown and a Report document that describes how that data should be displayed.

This article presents how to form a Report Display Component to display data within different DataSet objects that are described by a Report document (*.rdlc).

During my previous searches about displaying data within generic DataSet objects, I've encountered a set of different solutions. Most of them assumed DataSet objects are accessible during design time. Some others used TableAdapter objects that include SQL statements and/or Connection strings, etc. Probably, these solutions cover most of the situations a developer can encounter. But what if you don't have access to DataSet objects during design time, what if the overall architecture of the software doesn't let you to use SQL statements or connection strings on the architectural level you are currently working, what if you need to use data without knowing its structure until runtime, what if you need dynamic data sources rather than static?

I'm currently in need of a component that displays generic reports. My organization is developing accounting software and in accounting domain there are lots of changes in reports. After distributing and deploying the software, organization must give supporting service about newly added or changed reports. In the maintenance phase, it is costly to distribute a whole update that often. So what we need is some kind of a Report Import / Generic Report Display ability.

Before We Begin

As I've said before, in order to display a report, we need a DataSource (in this article, a populated DataSet instance) and a report document (*.rdlc file ). Once we have the Report-DataSet pair, we can display any report we want.

Logical representation of the Report Display Component

Figure 1a: Logical representation of the Report Display Component

How Do We Use DataSet as a Data Source?

A DataSet is an object that includes tabular data which can be represented by using XML format. What we need to know is that the structure of the data can be described by an XSD schema document which is also another XML based document.

DataSet <code>dsHesapPlan = new DataSet();

//...
//... Some code to populate data within the DataSet dsHesapPlan
//...

// Set the name of the DataSet which will be useful later
dsHesapPlan.DataSetName = "HESAP_PLAN";

// Can be used to write the of the DataSet
dsHesapPlan.WriteXmlSchema();

// Can be used to write the data within the DataSet as XML
dsHesapPlan.WriteXml();

Figure 1.b: Useful operations on a DataSet

Let's take a look at the schema of the DataSet, which we get by running the method dsHesapPlan.WriteXmlSchema():

Sample DataSet Schema which will be useful when designing the report.

Figure 1.c: Sample DataSet Schema which will be useful when designing the report.
Highlighted areas show naming information that will be used later.

What is a *.rdlc Report Document?

An rdlc Report Document is also another XML based document that defines how the data should be displayed. I'm not going to demonstrate how to form a report here. But there are some things you should know, so I'll form a checklist of actions to build a report.

  1. Form a schema of the DataSet which you will use (dsHesapPlan.WriteXmlSchema()).
  2. Add the schema to your Visual Studio Project. The schema will be visible within the Data Sources window.
  3. By using this schema, design your report.
  4. After you complete designing the report, save the project.
  5. Inside your project folder, you'll find the *.rdlc report document. Take it for redistribution.

Here is a part of the structure of a *.rdlc Report Document:

Sample .rdlc Report Document

Figure 1.d: Sample *.rdlc Report Document.
Highlighted areas show naming information which must show consistency with your DataSet definitions.

How to Bind a DataSet-Report Pair?

So, now we have a Report and a DataSet that can be bundled and sent to the client. Now what we need is a system to know what to do with this DataSet-Report pair.

Note that, you can send the report as the *.rdlc file itself. And DataSet can be distributed in a set of different ways. For example, executing CREATE scripts in client side to generate STORED PROCEDUREs that return the data forming the desired DataSet, or, by XML data itself, etc.

This part of the article assumes you have the properly designed Report document and the DataSet.

The following code shows how to bind a Report-DataSet pair to a ReportViewer object dynamically.

// A method to populate data inside the referenced DataSet
getDataSet(ref <code>dsHesapPlan);

// Set the path of the rdlc document
string reportPath = "Reports/AccountReport.rdlc";

// Initiate ReportViewer object
ReportViewer rView = new ReportViewer();
rView.Dock = DockStyle.Fill;
this.Controls.Add(rView);

// Add data source to the local report
// Note that the name should either be passed as parameter or 
// parsed from the report document
rView.LocalReport.DataSources
       .Add(new ReportDataSource("HESAP_PLAN_dtLast", dsHesapPlan.Tables[0]));

// Set the active report path of the ReportViewer object
rView.LocalReport.ReportPath = reportPath;

Figure 1.e: How to bind the DataSet and the generic Report dynamically.

Conclusion

This technique may be useful for developers experiencing similar problems with me. Surely, it is possible to build a real smart system to understand and display a report. I hope this article guides efforts for building such a system.

You may visit www.rdleditor.com for a series of related links.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

DIren
Web Developer
Turkey Turkey
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questiongreat to see this coding communitymembersteptome26 Mar '13 - 7:25 
i got a lot to learn from here.its great i found this site.Im interested in some businesses online so i checked this link http://www.reportingsoftware.info/enterprise-reporting-software/ad-hoc-report-software-complete-business-intelligence/[^]and they told me to come here
QuestionArticlememberSherry3324 Mar '13 - 9:21 
I was looking for an article like this for some time now, good thing Google exists and there are people to make this kind of articles.
All the best.
http://www.reportingsoftware.info/reporting-software-standards/reporting-software-whats-the-inside-scoop/
QuestionVery usefulmemberIlie Florian12 Mar '13 - 11:37 
I was looking for an article like this for a long time, thank God Google exists and there are people to make this kind of articles.
 
Keep up the good work
 
http://www.reportingsoftware.info/reporting-software-features/latch-on-the-secrets-of-business-efficiency/[^]
Questionconnect dataset to RDLC Report as DataSourcememberCool Smith7 Mar '13 - 17:21 
I created a data set manually and created a datatable pricelist. The reportviewr is in a usercontrol ucReport, which is loaded inside a panel at run tyime
 
i have created the report i want to bound its data to by doing this
Dim oRpt As New ucReport
     Dim ds As DataSet = GetDataset("prices")
     Dim rds As ReportDataSource = New ReportDataSource("ReportDataSet", ds.Tables(0))
                With oRpt.rvMain.LocalReport
                    .ReportPath = "Reports\pricelist.rdlc"
                    .DataSources.Clear()
                    .DataSources.Add(rds)
                    .Refresh()
                End With
 
ths getdata source looks like
Private Function GetDataset(ByVal sName As String) As DataSet
 
        Dim conn As New SQLiteConnection("Data Source=" & dbPath)
        conn.Open()
        Dim sql As String = Nothing
        Select Case sName.ToLower
            Case "prices"
                sql = "Select * FROM prices_view"
        End Select
 
        Dim ad As SQLiteDataAdapter = New SQLiteDataAdapter(sql, conn)
        Dim ds As DataSet = New DataSet
        ad.Fill(ds)
        Return ds
   End Function
 
When i run the report, i don't get anything in the report viewer
QuestionIts very interestingmembermrdonkey216 Feb '13 - 12:14 
It´s interesting for people like learn of this subject. It´s very important for the life
Generalfantastic jobmemberPaulo Neto9 Feb '13 - 9:21 
I was very useful, good job
 

thank you[^]
Questionvery interestingmembertotyou131 Feb '13 - 5:09 
this is very intresting... i like this article
2. A: http://www.reportingsoftware.info/reporting-software-standards/reporting-software-whats-the-inside-scoop/
QuestionHave a questionmemberslime1315 Dec '12 - 5:56 
Hi!
Have a question:
In *.rdlc file i always have a string
<DataSetName>MyDataSetName</DataSetName>
not
<DataSetName>MyDataSetName_TableName</DataSetName>
as in your example.
Should i change it manualy?
Thanks!
Generalreporting softwarememberlalalbut30 Aug '12 - 18:43 
Do you need better info on the products available, reporting software is a truly effective resource.
GeneralMy vote of 5memberbhalodiyapragnesh5 May '11 - 7:03 
I found my Solution Regarding Dynamic Dataset Binding in Report Through This....Excellent..>!!
QuestionI want to display in reportViexer1 report.rdlc data from a xml file with VB.net if possiblememberelmeksoaui110 Mar '11 - 12:49 
I want to display in reportViexer1 report.rdlc data from a xml file with VB.net if possible
 
thank you.
NewsHave you checked out the RDLReportViewer control...memberchris17516 Apr '10 - 18:18 
The RDLReportViewer[^] control is a control that shows RDL files without having SQL Server Reporting Services. The only property that you need to set on the control is the RDL file name. All the parameters will automatically be displayed[^], and all the datasets will automatically get loaded into the report. If the report needs to get changed, then simply change the rdl file and you're done. Check it out...
Chris

QuestionRemote ReportmemberAcidAndroid17 Dec '08 - 12:04 
Hi It's me again sorry for the troubles
 
I read the rdlc as a xmldocument to get the datasets and a tables in order to use those data to create a Datasoruce.
I do this with the reportviwer.localreport.reportpath("file.rdlc") and read the rdlc as xml this a Xmldocument.read("filepath")
The problem I have is that now I want to do the same with a server report using reportviwer.serverreport.reportpath("http://localhost/file.rdlc")
To read a remote xml i use:
 
Dim wr As Net.HttpWebRequest = CType(Net.WebRequest.Create("http://localhost/file.rdlc"), Net.HttpWebRequest)
wr.Timeout = 10000
Dim resp As Net.WebResponse = wr.GetResponse()
Dim stream As Stream = resp.GetResponseStream()
Dim reader As XmlTextReader = New XmlTextReader(stream)
reader.XmlResolver = Nothing
ds2.ReadXml(reader)
But i get an Exception saying that "error 404 server not found", However if i change "http://localhost/file.rdlc" for "http://localhost/file.xml" i Dont get any Exception and i get the xml structure.
 
How could I read the rdlc file as remote xml?
Thanks a lot.
AnswerRe: Remote ReportmemberDIren17 Dec '08 - 20:50 
Hello AcidAndroid,
 
I don't know what kind of application are you trying to develop but, if SQL Server and IIS are involved, its better to use rdl instead of rdlc. Because, the clients will need reportviewer components installed on their computers to view rdlc reports.
 
Anyway, we use a system like this:
 
We install an SQL Server to customer's database server computer. Then we install our products on client computers of the customer. A typical server-client accounting application. We store our rdlc documents in the database server. Note that rdlc is a text file and can be base64 encoded and decoded perfectly. We store them encoded in base64. When someone wants to display a report from a client computer, we simply get the content, decode it, write to TEMP folder and use it's filepath as the reportpath. This solution may solve your problem as well.
 
You can use these functions to encode and decode the content.
        private void someFunction()
        {
            string rdlc = "";
            string rdlcFilePath = @"C:\Temp.....xxxx.rdlc"; // Your Temp Path
            rdlc = readTextFileIntoString(rdlcFilePath);
            rdlc = base64Encode(rdlc);
        }
        public string readTextFileIntoString(string filePath)
        {
            string fileContents = "";
            try
            {
                XmlDocument xDoc = new XmlDocument();
                xDoc.Load(filePath);
                fileContents = xDoc.InnerXml;
            }
            catch (Exception)
            {  throw; }
            return fileContents;
        }
 
        public string base64Encode(string data)
        {
            try
            {
                byte[] encData_byte = new byte[data.Length];
                encData_byte = System.Text.Encoding.UTF8.GetBytes(data);
                string encodedData = Convert.ToBase64String(encData_byte);
                return encodedData;
            }
            catch (Exception e)
            {
                throw new Exception("Error in base64Encode" + e.Message);
            }
        }
 
        public string base64Decode(string data)
        {
            try
            {
                System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
                System.Text.Decoder utf8Decode = encoder.GetDecoder();
 
                byte[] todecode_byte = Convert.FromBase64String(data);
                int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
                char[] decoded_char = new char[charCount];
                utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
                string result = new String(decoded_char);
                return result;
            }
            catch (Exception e)
            {
                throw new Exception("Error in base64Decode" + e.Message);
            }
        }
 
I hope it helps...
 
There are 10 types of people in the world. Those who understand the binary and those who don't.

GeneralRe: Remote Reportmemberdg782 Sep '09 - 4:42 
Hi DIren,
 
I think it is good idea to centralize Rdlc reports inside a Sql Server database.
 
A small question about that :
why do you encode the xml into text ? it is not encrypted, everybody can decode. Why do not use an XML field in the sql table ?
 
Thanks
GeneralRe: Remote ReportmemberDIren2 Sep '09 - 5:36 
Encoding to base64 string is not for protection, but to eliminate any possible occurances of characters which may cause problems in an SQL Query, or the table itself. For ex: language specific characters. The database may not be configured to store them.
 
You can use an XML field, as long as you control the configuration of the database and the input XML content.
 
Cheers
 
There are 10 types of people in the world. Those who understand the binary and those who don't.

QuestionReport is ok but subreportmemberAcidAndroid12 Dec '08 - 8:57 
Hi DIren
 
I have done a report class based on your ideas and article but when i try to load a subreport i dont know how to pass the same dataset to subrepor i can see the data in the main rerpot but in the subreport a get a error.
here is my code and Im filling the dataset with a xml file just for test:
 
Dim rds As New ReportDataSource
Dim nlist As Xml.XmlNodeList
Dim d As New Xml.XmlDocument
Dim dsname As String = Nothing
Dim dstable As String = Nothing

d.Load("D:\Orders.rdlc")
ds.Reset()
ds.ReadXml("D:\SubreportInList\Orders.xml")
 
'I get the data for the datasource from the rdlc file
 
nlist = d.GetElementsByTagName("DataSet")
 
Me.rprtv1.LocalReport.DataSources.Clear()
 
For Each nodo As Xml.XmlNode In nlist
dsname = nodo.Attributes("Name").Value
For Each ele As Xml.XmlElement In nodo
If ele.Name = "rd:DataSetInfo" Then
dstable = ele.Item("rd:TableName").InnerText
Exit For
End If
 
Next
If dsname <> "" And dstable <> "" Then
Me.rprtv1.LocalReport.DataSources.Add(New ReportDataSource(dsname, ds.Tables(dstable)))
End If
Next
 
Until this i can fill the report with the proper data but how couli do it with a subrport
Thanks for your time and patience
AnswerRe: Report is ok but subreportmemberDIren12 Dec '08 - 9:17 
There is an excellent sample in gotreportviewer.com
 
http://www.gotreportviewer.com/Subreport.zip
 
I hope it helps.
 
There are 10 types of people in the world. Those who understand the binary and those who don't.

GeneralRe: Report is ok but subreportmemberAcidAndroid17 Dec '08 - 13:32 
Thanks a lot it was really helpful
GeneralSome problemsmember_str_618 May '08 - 5:44 

DataRow dr;
DataTable dt = new DataTable();
dt.Columns.Add();
dt.Columns.Add();
Random rand = new Random(10000);
 
for (int i = 0; i < 100; i++)
{
dr = dt.NewRow();
dr[0] = i;
dr[1] = rand.Next();
dt.Rows.Add(dr);
}
DataSet ds = new DataSet();
ds.Tables.Add(dt);
ds.DataSetName = "ggg";
ds.WriteXmlSchema(@"c:\scheme");
ds.WriteXml(@"c:\scheme1");
string reportPath = @"C:\Documents and Settings\...\Report1.rdlc";//full path
Microsoft.Reporting.WinForms.ReportViewer rv = new Microsoft.Reporting.WinForms.ReportViewer();
rv.Dock = DockStyle.Fill;
this.Controls.Add(rv);
 
rv.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("ggg", ds.Tables[0]));
rv.LocalReport.ReportPath = reportPath;
rv.RefreshReport();

In the issue I receive an empty ReportViewer...
Help!!! May be I forget about something
GeneralRe: Some problemsmemberDIren14 May '08 - 22:30 
...
ds.WriteXmlSchema(@"c:\scheme");
ds.WriteXml(@"c:\scheme1");
--------------------------------------> Your Report1.rdlc must be already designed by using the specified "scheme1.xml" data, and "scheme.xsd" scheme at this point.
 
string reportPath = @"C:\Documents and Settings\...\Report1.rdlc";//full path
Microsoft.Reporting.WinForms.ReportViewer rv = new Microsoft.Reporting.WinForms.ReportViewer();
...
 

I'm sure your problem is not related with the design. Otherwise you'd get an exception when assigning the reportpath. The code seems to be fine. I can only recommend using
ds.WriteXml(@"c:\scheme1.xml",XmlWriteMode.WriteSchema);
instead of
ds.WriteXml(@"c:\scheme1");
 
----
 
Ok. I've got it. Thats the problem:
 
This is your original code:
rv.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("ggg", ds.Tables[0]));
 
Note that "ggg" is your DataSet name. You need the name of the data source which is by default a string including both dataset and datatable names. Like this:
 
string dataSourceName = ds.DataSetName + "_" + dt.TableName;
 
So you should simply replace your data source adding line with
 
rv.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource(ds.DataSetName + "_" + dt.TableName , ds.Tables[0]));
 
Hope that helps...
 
Cheers Smile | :)
 
There are 10 types of people in the world. Those who understand the binary and those who don't.

GeneralRe: Some problemsmemberHari Om Prakash Sharma6 Jul '08 - 20:30 
I tried following code:
reportViewer1.ProcessingMode = ProcessingMode.Local;
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource(ds.DataSetName + "_" + dt.TableName, ds.Tables[0]));
reportViewer1.LocalReport.Refresh();
//reportViewer1.RefreshReport();
 
But still no data is shown in report viewer. During debugging the code. reportViewer1 is showing the data, which is containing rows.
What could be the problem???
 

First and the Foremost: FIGHT TO WIN


MySite:
HariOmPrakash.InFo

GeneralRe: Some problemsmemberDIren7 Jul '08 - 0:55 
Hi Hari,
 
Your code works fine. I just renamed "reportViewer1" into "rv", and set the report path strings. I'm posting the code along with the schema and report.
 
      DataRow dr;
            DataTable dt = new DataTable();
            dt.Columns.Add();
            dt.Columns.Add();
            Random rand = new Random(10000);
 
            for (int i = 0; i < 100; i++)
            {
                dr = dt.NewRow();
                dr[0] = i;
                dr[1] = rand.Next();
                dt.Rows.Add(dr);
            }
            DataSet ds = new DataSet();
            ds.Tables.Add(dt);
 
            ds.DataSetName = "ggg";
            ds.WriteXmlSchema(@"c:\scheme.xsd");
            ds.WriteXml(@"c:\scheme1.xml", XmlWriteMode.WriteSchema);
            /* Don't forget that you will need the scheme of the dataset, in DESIGN TIME to succesfully design your Report. Thus you need to run the first part of the code (from thebeginning to to this point.) and generate the xml / xsd. Then add these files to your VS project. Visual Studio will use the scheme as a DataSource to help you design the report. Then add a Report (rdlc file). Use the data elements in the DataSource pane of Visual Studio. */
 

            string reportPath = @"C:\Report1.rdlc";//full path 
            /* Give the exact path of your Report1.rdlc AFTER you design it. And of course there is no need for the WriteXmlSchema / WriteXml section of the code to run again and again once you have the Report1.rdlc in place. */
 
            Microsoft.Reporting.WinForms.ReportViewer rv = new Microsoft.Reporting.WinForms.ReportViewer();
            rv.Dock = DockStyle.Fill;
            this.Controls.Add(rv);
 
            rv.ProcessingMode = ProcessingMode.Local;
            rv.LocalReport.DataSources.Add(new ReportDataSource(ds.DataSetName + "_" + dt.TableName, ds.Tables[0]));
            rv.LocalReport.ReportPath = reportPath;
            rv.RefreshReport();
 

 

 

<small><?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <DataSources>
    <DataSource Name="DummyDataSource">
      <rd:DataSourceID>5702bc66-cacd-478e-ba6f-f2e55ec9e184</rd:DataSourceID>
      <ConnectionProperties>
        <DataProvider>SQL</DataProvider>
        <ConnectString />
      </ConnectionProperties>
    </DataSource>
  </DataSources>
  <InteractiveHeight>29.7cm</InteractiveHeight>
  <rd:DrawGrid>true</rd:DrawGrid>
  <InteractiveWidth>21cm</InteractiveWidth>
  <rd:GridSpacing>0.25cm</rd:GridSpacing>
  <rd:SnapToGrid>true</rd:SnapToGrid>
  <RightMargin>2.5cm</RightMargin>
  <LeftMargin>2.5cm</LeftMargin>
  <BottomMargin>2.5cm</BottomMargin>
  <rd:ReportID>25c74fdf-7859-4780-a4b9-cf22c56c4bb5</rd:ReportID>
  <PageWidth>21cm</PageWidth>
  <DataSets>
    <DataSet Name="ggg_Table1">
      <Fields>
        <Field Name="Column1">
          <DataField>Column1</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="Column2">
          <DataField>Column2</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
      </Fields>
      <Query>
        <DataSourceName>DummyDataSource</DataSourceName>
        <CommandText />
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
      </Query>
      <rd:DataSetInfo>
        <rd:DataSetName>ggg</rd:DataSetName>
        <rd:TableName>Table1</rd:TableName>
      </rd:DataSetInfo>
    </DataSet>
  </DataSets>
  <Width>16cm</Width>
  <Body>
    <ColumnSpacing>1cm</ColumnSpacing>
    <ReportItems>
      <Table Name="table1">
        <DataSetName>ggg_Table1</DataSetName>
        <Top>1.25cm</Top>
        <Details>
          <TableRows>
            <TableRow>
              <TableCells>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="Column1">
                      <rd:DefaultName>Column1</rd:DefaultName>
                      <Style>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>1</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>=Fields!Column1.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="Column2">
                      <rd:DefaultName>Column2</rd:DefaultName>
                      <Style>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <CanGrow>true</CanGrow>
                      <Value>=Fields!Column2.Value</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
              </TableCells>
              <Height>0.63492cm</Height>
            </TableRow>
          </TableRows>
        </Details>
        <Header>
          <TableRows>
            <TableRow>
              <TableCells>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox1">
                      <rd:DefaultName>textbox1</rd:DefaultName>
                      <Style>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>5</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Column1</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox2">
                      <rd:DefaultName>textbox2</rd:DefaultName>
                      <Style>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>4</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value>Column2</Value>
                    </Textbox>
                  </ReportItems>
                </TableCell>
              </TableCells>
              <Height>0.63492cm</Height>
            </TableRow>
          </TableRows>
        </Header>
        <TableColumns>
          <TableColumn>
            <Width>9cm</Width>
          </TableColumn>
          <TableColumn>
            <Width>7cm</Width>
          </TableColumn>
        </TableColumns>
        <Height>1.90476cm</Height>
        <Footer>
          <TableRows>
            <TableRow>
              <TableCells>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox7">
                      <rd:DefaultName>textbox7</rd:DefaultName>
                      <Style>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>3</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value />
                    </Textbox>
                  </ReportItems>
                </TableCell>
                <TableCell>
                  <ReportItems>
                    <Textbox Name="textbox8">
                      <rd:DefaultName>textbox8</rd:DefaultName>
                      <Style>
                        <PaddingLeft>2pt</PaddingLeft>
                        <PaddingRight>2pt</PaddingRight>
                        <PaddingTop>2pt</PaddingTop>
                        <PaddingBottom>2pt</PaddingBottom>
                      </Style>
                      <ZIndex>2</ZIndex>
                      <CanGrow>true</CanGrow>
                      <Value />
                    </Textbox>
                  </ReportItems>
                </TableCell>
              </TableCells>
              <Height>0.63492cm</Height>
            </TableRow>
          </TableRows>
        </Footer>
      </Table>
    </ReportItems>
    <Height>5cm</Height>
  </Body>
  <Language>en-US</Language>
  <TopMargin>2.5cm</TopMargin>
  <PageHeight>29.7cm</PageHeight>
</Report></small>
 

 
br mode="hold" />
 
Good luck
 
There are 10 types of people in the world. Those who understand the binary and those who don't.

GeneralRe: Some problemsmemberHari Om Prakash Sharma7 Jul '08 - 2:18 
Thanks for the reply. I will work on it.
BTW, I like your signature. Blush | :O
 

First and the Foremost: FIGHT TO WIN


MySite:
HariOmPrakash.InFo

GeneralRe: Some problemsmembersanzopaol9 Feb '11 - 7:51 
Hi,
i' tried to use method shown in the previous thread but a run time i recevide this error:
 
Control 'ctl01_ReportViewer' of type 'UpdatePanel' must be placed inside a form tag with runat=server.
 
My report is inside masterpage.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 25 Jul 2006
Article Copyright 2006 by DIren
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid