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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Database Location

Status
Not open for further replies.

LucyColey

Programmer
Apr 30, 2001
34
0
0
US
We're trying to set up a process to run our reports through the web and I'm hoping that there is an easy way to get around having multiple copies of the same report.

For example, a report may be used by a dozen different clients, which means each would use the same report, but need to be linked to different databases. Is there any way to allow end users to set the location of the database without going directly through Crystal?
 
I have a DLL I created using these functions automatically, so I don't have to write this in every program. Here is the syntax I use:

Private CrystalDatabase As CRPEAuto.Database
Private CrystalTables As CRPEAuto.DatabaseTables
Private CrystalTable As CRPEAuto.DatabaseTable

Set CrystalDatabase = CrystalReport.Database
Set CrystalTables = CrystalDatabase.Tables
For TableCount = 1 To CrystalTables.Count
Set CrystalTable = CrystalTables.Item(TableCount)
CrystalTable.Location = DataFileLocation
Next TableCount


Hope this helps
 
If you can identify the user as he/she comes into your Web site (do they login with a username to the site?), you can have a CASE statement in ASP/VBscript that based upon the user/client performs a .LogonServer to the correct database, then runs the report. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
(Currently available for consulting in Chicago)
 
Dear casman2,

Can you please tell me where can I find CRPEAuto reference.

Regards
Andreas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top