mysticamber
mysticamber

Reputation: 11

Connect Crystal Report to multiple Databases

Is there a way to connect a crystal report to multiple databases?

My database (SQL Server) is periodically archived and sometimes, I need to access data from an older "partition"/archive, let's call them DB109 and DB110. I need to produce one report with data from both DB109 and DB110. They have the same structure, same query, etc.

Is there a way to run the report for both DBs without running them separately and ending up with multiple files?

Upvotes: 0

Views: 1041

Answers (1)

thursdaysgeek
thursdaysgeek

Reputation: 7946

It seems like you could probably make two subreports, with one linking to one db and the other linking to the second. Add a parameter on whether to run the first, second, or both. And then conditionally display the subreports based on the parameter.

A second option would be to have a linked server in your main database to your archive database, and then write a procedure that pulls from both (perhaps also based on a parameter). Then use that procedure as your Crystal source.

Upvotes: 1

Related Questions