Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapping crystal report fields from one database table to multiple tables from a different database

Status
Not open for further replies.

vvasireddy9

Technical User
May 20, 2014
1
US
There are several crystal reports that need to be remapped to a new database we have in place. The data structure has quite changed. I started using the 'Set datasource Location' option to map the new database fields to existing fields in the report. The problem shows up when trying to map fields from multiple tables to existing fields in the report from a single table. To elaborate, the old database structure has only one table used for a report and the new database structure has these same fileds coming from two different tables. The 'Set datasource Location' option is leting me map the existing table used in the report to only one report. Is this how this functionality works or am I missing something. Please advise the best way to do this mapping.


VJ
 
How are your SQL skills? Can you write a Select statement that contains all of the fields your report needs by joining the two new tables? If so, try this:

1. In the Destination part of "Set Location", open the data connection to the new database.
2. You should see an option labeled "Add Command". Select that and type in the SQL that joins to two tables together.
3. Since Crystal will see the command as a single table, you should now be able to map all of your fields from the table in the old database to the command in the new one.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Can you create a view in your new database matching the structure and the name of the table in the old database ? If you can, you need just to point the report to the new database using "Set Datasource Location". It will start using the view.

Viewer and Scheduler for Crystal reports, SSRS and Dynamic Dashboards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top