0

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?

jradich1234
  • 1,410
  • 5
  • 24
  • 29
  • Change your approach to the "push" model....where you populate a dataset with data and "push" in into the Crystal Report. Then you can populate the dataset from 1 to N source databases. – granadaCoder Dec 16 '15 at 21:03

1 Answers1

1

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.

thursdaysgeek
  • 7,696
  • 20
  • 78
  • 115