I am new to RDLC reporting, my requirement is simple. I have designed a report and i have set some parameters in that report to populate dynamic data.
Now i have requirement to display table dynamically as well. So what i did:
DataSet InvoiceSummaryDs = new DataSet();
DataTable table = new DataTable();
table.TableName = "summary";
table.Columns.Add( "name", typeof( string ) );
table.Rows.Add(Invoice.TotalBooking);
table.Rows.Add("£ " + Invoice.BillAmount);
table.Rows.Add("£ " + Invoice.BillAmount + " <br />" + "£ " + Invoice.VatAmount);
table.Rows.Add("£ " + Invoice.NetAmount);
InvoiceSummaryDs.Tables.Add(table);
ReportDataSource rptDataSource = new ReportDataSource("DSPrice", InvoiceSummaryDs.Tables[0]);
rv.LocalReport.DataSources.Add(rptDataSource);
rv.LocalReport.SetParameters(parms);
rv.LocalReport.Refresh();
so there is no issue at server side code but i get error in report: Error 13 The dataset ‘DS_NAME’ refers to the data source “”, which does not exist.
Error 14 The tablix ‘Tablix1’ is in the report body but the report has no dataset. Data regions are not allowed in reports without datasets.
In rdlc file i created a dataset with same name "DSPrice" having no source because i want to populate data from server side dynamically not from here.
I have already seen this example:
http://www.gotreportviewer.com/ Generate RDLC dynamically - Table
in which dynamic table binding is possible thorugh dynamic report creation but i dont want to create dynamic report.
any one guide me what is the solution? any help would be appreciated.