Setting multiple datasource for a report in Asp.net
- by Nandini
Hi all,
I have a report whose data is derived from two stored procedures.so i need to set these two datasources for generating the report.But the reports which have only one SP, ie.only one datasource works properly. For setting the datasource, i wrote code like this:
dim reportdocument as ReportDocument
Dim reportPath As String = Server.MapPath("CrystalRpts\Report.rpt")
ReportDocument.Load(reportPath)
'Function for Setting the Connection
SetDBLogonForReport(MyConnectionInfo, ReportDocument)
dim dt1 as datatable=Datasource1
dim dt2 as datatable=Datasource2
dt1.merge(dt2)
reportdocument.setDataSource(dt1)
CrystalReportViewer.ReportSource=reportdocument
But, the report is not generating.it shows the following error
The Report requires additional information
Servername:- Server
Database:- Database
UserID:-
Password:-
But the reports which have only one SP, ie.only one datasource works properly.What colud be reason for this error?