Connecting Different Data Source
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2198
Printed Date: 09 Apr 2025 at 9:16am
Topic: Connecting Different Data Source
Posted By: Krishna Kumar
Subject: Connecting Different Data Source
Date Posted: 01 Feb 2008 at 5:20am
Hi,
We have an application in COBOL which triggers the CR (Version 8). The report reads from the flat file to populate the data thru CONOX. The database changes from one country to the other but table structures do not differ. Please let me know if it is possible to build a report which connects to five different countries in the same report and populate the data.
Thanks.
|
Replies:
Posted By: Lugh
Date Posted: 01 Feb 2008 at 5:40am
Brian or someone will have to answer if it is actually possible. I'm guessing that it is not possible with COBOL, as you would need some of the API's from .NET to accomplish it.
The much simpler solution, though it may go against a number of "best practice" habits, is to create a separate report for each data source. It is a relatively simple matter to open a report and change its data source manually. Then, save it as a separate instance of the report. Have your COBOL simply call the appropriate report, rather than trying to modify the report's data source when it's called.
Now, obviously, this doesn't work if the name of your flat file changes between executions (e.g., includes the current date, or some version number). In that case, you may need to get a little more creative. I would recommend actually running a little operation to copy the data from the flat file into a common temporary file, generate the report based on the temporary file, then either clean or delete the temp file. This will be the best way to keep Crystal happy.
|
Posted By: Krishna Kumar
Date Posted: 04 Feb 2008 at 12:52am
Thank you for your reply Lugh. We have found another way to do this (fingers crossed ;)). We have decided to get the replica of the flat file on to Oracle DB. Have synonym links for different countries and so a single report can be connected to different Data sources via synonym links.
Thanks once again.
|
|