Page 1 of 1
Multiple Datasource
Posted: Tue Feb 19, 2008 1:27 am
by third
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
Posted: Tue Feb 19, 2008 1:54 am
by Edward
Please modify your code as follows:
Code: Select all
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtCompany",dtCompany);
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtAddresses",dtAddresses);
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtPhones",dtPhones);
report.RegData("MyDataSourceNameInTheReportDictionaryFor_dtContacts",dtContacts);
report.CacheAllData = true;
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.
Multiple Datasource
Posted: Tue Feb 19, 2008 2:02 am
by third
Thanks a lot!
Multiple Datasource
Posted: Tue Feb 19, 2008 2:04 am
by Edward
You are welcome.
Let us know if any help is required.
Thank you.