Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connecting to different datasource/database at runtime

Status
Not open for further replies.

dyan24

Technical User
Sep 7, 2004
56
CA
Hello,

Currently we have 600+ existing reports that we would like to consolidate. Each of those 10 reports have the same report format but just connecting to a different database, i.e. different company name.

Now, we would like to create just one report with a parameters of company name and based on the company name selected, we would like to dynamically connect to the right database.

If you were able to this already, can please provide any help on how this can be done. I am going to install CR 10 today on my machine and we are using SQL Server 2K.

Thanks in advance!!
 
Try subreports, each of them can be linked to something different. Have just basic coding in the main report, and a set of subreports which are each in a different section of the report footer. Suppress whichever sections are not wanted for the particular parameters.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
but creating sub-reports would not help us in consolidating the report. What the company would like to achieve is to reduce 600+ reports to 150.

Thanks!
 
Hi,
It may not be possible in SqlServer but you could create a
view/procedure that takes a company name as a parameter and,based on that, selects the data from the correct source..


[profile]
 
That is one of our option, but i am thinking that maybe in Crystal Report you can dynamically select the database name.

Does anybody knows if it possible?

TIA,
 
Here's my scenario that i'm hoping to...

report.rpt run on Dbase1, Dbase2, etc.

Could there be a function in Crystal Report (i am using v10) that enable this to be done?
 
In addition to using Crystal 10 are you also using Enterprise 10. If so, then dynamic connections is one of the features of using Business Views. Business Views is part of the CE10 environment.
 
I would avoid using Business Views, this is yet another proprietary layer which on the surface has some advantages, but you're better served to keep database objects on the database if possible.

I don't understand why you didn't take Turk's suggestion, you would then be able to reuse/maintain this codebase on the database side rather than embedding rules in the client.

-k
 
Once we were able to consolidate all the reports, we are planning of migrating the reports to Crystal Enterprise.

Hmmm...synapsevampire, can you provide more info on why Business View is not a good solution? And like i said, Turks suggestion is one of the option as well that we are considering. We are currently investigating all options.

Thanks again for all your reply. Appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top