views:

93

answers:

3

I have a Crystal 2008 report that will be deployed to an InfoView server. There are four different databases the user might want to execute the report against. Each of the four databases have exactly the same schema. Only the data in each is different. Each database corresponds to a plant we have around the world.

Instead of creating four different reports (each one connected to one of the four databases), am I able to dynamically change the server/database the report hits based on a value the user enters into a parameter? I'm really trying to avoid having to create four identical reports except for the database connection on each. If this isn't possible, how do developers typically deal with this sort of scenario? I would imagine it's fairly common.

Thanks very much.

A: 

I'm not familiar with InfoView, but it is quite common to do what you describe, I've done similar things with Asp.Net and Winforms; if you have access to the Crystal Reports object model, there are extensive options for setting logon info, I think it is SetDatabaseLogon; if you have subreports, you have to set the login for each of those separately.

The schemas do have to be completely identical, or the user will get warnings.

SqlACID
+1  A: 

InfoView doesn't support dynamically changing a report's datasource. You certainly could modify InfoView source to suit your needs with the BusinessObjects Enterprise SDK, but that will be a challenge and won't be supported by BO.

Another option is to build a custom portal with the BusinessObjects Enterprise SDK, but this will require quite a bit of coding as well.

Probably the best option is to publish the report multiple times, set each datasource as appropriate (via the CMC), and change the name of the report to give an indication of its datasource (via the CMC). I there is a report property in the CMC that will save the datasource settings so you can quickly republish the reports if you make a change to the original.

Craig
A: 

Hi Randy, i have a similar question. I have three databases with the same schema (development, tests and production). I don´t want to change database dynamically but, i want to publish the same rpt file in different servers, avoiding to modify the rpt file (designers create rpt based on dev database and send them to me).

Craig, i tried exactly what you said (publishing the report multiple times, setting each datasource as appropriate) but, i had no success.

In CMC, in the section where i can set the db logon informations, only the datasource that the rpt was original created is available. How can i change it?

Thanks

pswolf1984