Showing results for 
Search instead for 
Did you mean: 

Subreport accessing different database than primary report

Former Member
0 Kudos

My report "table" is a sproc. There are two subreports in the primary report. The first subreport is in the header and will display the organization name.  The subreport in the footer should be displaying the filters used in the sproc.

When I set the database location for the primary report I set it to a sproc on an ODBC located on my computer. I will remove the hardcoding for the database location from the string. This is necessary since this report will be run from a server and access a different database with the sproc depending on the client accessing the report. The first subreport works and will show the organization name.

When I verify the subreports with the primary report I also check that the location of the database is not hardcoded.

Problem I am getting is the subreport is accessing a different database than the main report.

Is there something I am missing on making the subreport access the same database as the primary report?

Yes I am using Crystal Reports 8.5 and will not be able to upgrade to a later version. This is being used by a legacy system we have that is being used in an enterprise environment.

The process we have used has been used since I took over 4 years ago. The attached images show they are referencing different databases. Concern I have is if I reset the subreports they will not be linked with the primary report if accessing another database.

The other issue is when placed on production the subreports' databases will no longer exist or be accessible.

Thank you for any insight you have.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Seems odd but the issue was resolved when I set them all to the same location first. One they are all set to the same db then I can change the main report and the subreports will be changed too point to the new db.

Answers (0)