I created a report on the designer with multiple datasource and works fine. Now I'm trying to pass the datasources on the codebehind load the report but I'm only getting data from the last binded datasource. How do I fix this? Thanks.
report.RegData(dtCompany);
report.RegData(dtAddresses);
report.RegData(dtPhones);
report.RegData(dtContacts);
Multiple Datasource
Multiple Datasource
Please modify your code as follows:
or set the name of each table before register it in the Dictionary, e.g.:
Property CacheAllData is used when relations are present for the DataSources from different DataConnections.
Thank you.
Код: Выделить всё
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtCompany",dtCompany);
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtAddresses",dtAddresses);
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtPhones",dtPhones);
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtContacts",dtContacts);
report.CacheAllData = true;
Код: Выделить всё
dtCompany.TableName = "dtCompany"
Thank you.