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!

Unable to refresh DBName of subreport

Status
Not open for further replies.

thomasyu

Programmer
Jun 22, 2001
15
0
0
HK
I have a rpt of CRW 6.0 which contain a sub-report. I invoke the rpt file thru a VB executable with connect property of the OCX set to the proper database. It is because the report is intended to run under different db, a testing db, a UAT db, a production db.

I have downloaded a utility in CRW site for changing the db location and discover that the CRW extract the db name and stored with the report definition. When I run it in another db, runtime error states that dbname.table.field is missing.

My VB program has some code to refresh the db connection. The rpt works fine if the sub-report is removed. The sub report is embedded inside the original rpt and created under the same db and the parent rpt.

It seems that refreshing the connect property of the OCX won't pass down the sub-report.

Do anybody have experience for that and any way to solve the issue?
 
I am pretty sure that you have to connect BOTH the main report and the subreport, with separate lines of code. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top