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 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?