Sep 09, 2009 04:40 AM|imansom|LINK
I need help. I have two exactly same databases i.e. 'Database1' and 'Database2' both with one table 'Table'. Now I need to create one report displaying some informations (not all) from 'Table'. I would like to know how to programmicaly change datasource
for report from 'Database1' to 'Database2'. I made report using OLE DB connection ('Database1' as initial database). Then I`ve tried something like this:
ReportDocument crystalReport = new ReportDocument();
crystalReport.SetDatabaseLogon("sa", "sa", @"SERVER", "Database1");
CrystalReportViewer.ReportSource = crystalReport;
and thats working. Now if I change 'Database1' in SetDatabaseLogon to 'Database2' message 'The report you requested requires further information.' shows and I`m asked to enter loggon informations but can`t change database name which is still 'Database1'.
I would be thankful for any advice or link.
Majk from Slovakia