Multiple Datasources in ReportDatasource
-
Wednesday, March 10, 2010 3:14 AM
gud day,
is it posible to have multiple report datasources??
something like this.
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Operational_Operational_Status", ds.Tables["Operational_Status"])); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Operational_Operational_Priority", ds1.Tables["Operational_Priority"]));i feel like the Operational_Priority datasources is always overwriting the first one which is Operational_status. that's why in the runtime it cannot find the operational_status.
any comments and suggestion is much appreciated.
thanks,
ivan
All Replies
-
Wednesday, March 10, 2010 5:42 AM
i have already fixed this. i have different error. but right now i have already identified it.
thanks.- Marked As Answer by jihmantiquilla Wednesday, March 10, 2010 8:35 AM
-
Saturday, January 05, 2013 8:25 AM
Dear Jihmantiquilla,
Iam generating the pdf file out this code using 2 datatables of dataset, but in the data is displaying only of ds.Tables[0] , not of ds.Tables[1].
my code is as below .
ReportViewer viewer =newReportViewer();viewer.ProcessingMode = ProcessingMode.Local;viewer.Reset();viewer.LocalReport.ReportEmbeddedResource =@"D:\Projects\NIKHIL\NIKHIL\Report3.rdlc;viewer.LocalReport.ReportPath = @"D:\Projects\NIKHIL\NIKHIL\Report3.rdlc;viewer.LocalReport.DataSources.Clear();viewer.LocalReport.DataSources.Add(newReportDataSource("DataSet1", ds.Tables[0]));viewer.LocalReport.DataSources.Add(newReportDataSource("DataSet2", ds.Tables[1]));viewer.LocalReport.Refresh();byteViewer = viewer.LocalReport.Render(reportType, deviceInfo,outmimeType,outencoding,outextension,outstreamIds,outwarnings);returnbyteViewer;Please suggest solution..

