gsuresh17
asked on
Multiple Starting points
How can I have multiple datasource in CR 9.
For ex. If I have tables linked as one datasource and if I define a SQL as another datasource, Then I get an error saying "More than one datasource is used....".
But I would like to have columns from both the datasource. They are different fields from different tables under different conditions.
Any inputs appreciated
For ex. If I have tables linked as one datasource and if I define a SQL as another datasource, Then I get an error saying "More than one datasource is used....".
But I would like to have columns from both the datasource. They are different fields from different tables under different conditions.
Any inputs appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad i could help
mlmcc
mlmcc
Subreports are definitely a viable option, but they might not be the most efficient. The section in which the subreport is placed and the size and integrity of the tables used can definitely affect performace. For example, if you place the subreport in the detail level of the master report and there are 5k detail lines in the report, then the subreport will be executed 5,000 times! This can cause performance nightmares, both in Crystal and on the database.
Other options you have are:
1) Link all of the tables in MS Access, then use Access as the sole datasource for the report
2) Create a View in your database - the databases can be joined in the View, which will be used as the sole database for the report
3) Create a Stored Procedure - the databases can be joined in the Procedure, which will be used as the sole database for the report
4) Create a SQL Command Object with Crystal Reports 9 - the databases can be joined in the Command, which will be used as the sole database for the report
See some commonality between all of these solutions? Different ways of accomplishing the same thing, but they can all be viable options. The benefit to using any one of these solutions is that your performance is pretty much guaranteed to be better than if you use subreports.
~Kurt