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!

single report connect to multiple databases dynamically

Status
Not open for further replies.

bugeditor

Technical User
Oct 9, 2001
44
0
0
IN
How do we connect to multiple databases dynamically through VB to a report,provided databases are identical.report not getting refreshed.

Do we need to take any steps during design of crystal report.

First of all is it possible or we need to create duplicate report and set server location.

Iam getting confused because eventhough I set connect sting dynamically to the report.it is displaying the data of database which was used during design time of report only.

Can anybody give me a hint

Thanks
 
Hi,
Its going out of reply..once again iam explaining my problem

I am using VB6 and Segate Crystal Reports 7 and Access 2000 and I used crystal report activeX control(CRYSTL32.OCX) and I have used ODBC Connectivity.

I have designed many reports with a database using ODBC Connectivity.But,I need to change the name the DSN at runtime.Eventhough I set connect string dynamically to the report.it is displaying the data of database which was used during design time of report only.But It never connects to
other database(ofcourse the databases are identical)and executing the data of designed database only.

The report has following code:Here "CryRpt" is the report control

#################
CryRpt.Reset
CryRpt.DiscardSavedData = True
CryRpt.Connect = sConnect
CryRpt.ReportFileName = G_ReportPath & "Progress.Rpt"
CryRpt.WindowState = crptMaximized
CryRpt.Action = 1
####################
Here sConnect is ODBC connect string

But it never connects.Please anybody can tell me how to achieve my task

Thanks



 
if you have multiple databases with identical schemas and you are using VB as application to generate report dynamically then its better you develop your reports on Active Data(Field definitions Only) (.ttx file ext.)
In this case you have no need to connect your reports to database server, you execute your sql query or stored procedure in respective database using VB code, get final result in your recordset then pass that recordset to crystal Report.
See Crystal help for mor info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top