Hi all,
I was charged with getting an old report to work when the database was moved to the new database servers. I documented everything in this post:
http://www.vbforums.com/showthread.p...ith-CR9-report
There are three servers: CorpPac, CorpAt and CorpDev. One of the three databases has a different name but is identical to the other two:
CorpPac db name: CorpDataCA
CorpAt db name: CorpData
CorpDev db name: CorpDataCA
I used CorpDev to do all development work and testing. The report was working well. At this time some one else is conducting further tests. The first task that the tester did was to switch from the CorpDev server to the CorpAt server. When he ran the report he got the "Unknown query engine error". I have been looking into this, but this error seems to be somewhat generic and the information that I have found has not been helpful. I performed more tests by tweaking the Set DB location database spec in the RPT file and logging in into my app using the three different servers:
RPT database set location: CorpPac.CorpDataCA
App login: CorpPac, CorpDataCA report is ok
App login: CorpDev, CorpDataCA report is ok
App login: CorpAt, CorpData report generates error
App login: CorpDev, CorpData report is ok (Note: CorpDev has both databases)
RPT database set location: CorpAt.CorpData
App login: CorpPac, CorpDataCA report generates error
App login: CorpDev, CorpDataCA report is ok
App login: CorpAt, CorpData report ok
App login: CorpDev, CorpData report is ok
My conclusions:
The report generates well when run against the dev server, regardless of database or how the RPT report file is configured
The report generates well when run against the same server as the RPT report file is configured
The report consistently generates the error when the RPT file is configured to CorpPac and the application passes logon credential for CorpAt, or viceversa.
I am using the following code to log on to the server:
I use Tables(1) explicitly because the report makes use of only one table.
Thank you for your time. Any ideas on how to resolve this issue will be greatly appreciated, as always. SGarv
I was charged with getting an old report to work when the database was moved to the new database servers. I documented everything in this post:
http://www.vbforums.com/showthread.p...ith-CR9-report
There are three servers: CorpPac, CorpAt and CorpDev. One of the three databases has a different name but is identical to the other two:
CorpPac db name: CorpDataCA
CorpAt db name: CorpData
CorpDev db name: CorpDataCA
I used CorpDev to do all development work and testing. The report was working well. At this time some one else is conducting further tests. The first task that the tester did was to switch from the CorpDev server to the CorpAt server. When he ran the report he got the "Unknown query engine error". I have been looking into this, but this error seems to be somewhat generic and the information that I have found has not been helpful. I performed more tests by tweaking the Set DB location database spec in the RPT file and logging in into my app using the three different servers:
RPT database set location: CorpPac.CorpDataCA
App login: CorpPac, CorpDataCA report is ok
App login: CorpDev, CorpDataCA report is ok
App login: CorpAt, CorpData report generates error
App login: CorpDev, CorpData report is ok (Note: CorpDev has both databases)
RPT database set location: CorpAt.CorpData
App login: CorpPac, CorpDataCA report generates error
App login: CorpDev, CorpDataCA report is ok
App login: CorpAt, CorpData report ok
App login: CorpDev, CorpData report is ok
My conclusions:
The report generates well when run against the dev server, regardless of database or how the RPT report file is configured
The report generates well when run against the same server as the RPT report file is configured
The report consistently generates the error when the RPT file is configured to CorpPac and the application passes logon credential for CorpAt, or viceversa.
I am using the following code to log on to the server:
Code:
Set crReport = crApp.OpenReport(sRptFilePath)
crReport.Database.Tables(1).ConnectionProperties.DeleteAll
'I need to pass DB logon credentials to the report.
crReport.Database.Tables(1).ConnectionProperties.Add "Provider", "SQLOLEDB"
crReport.Database.Tables(1).ConnectionProperties.Add "Data Source", sSrv
crReport.Database.Tables(1).ConnectionProperties.Add "Initial Catalog", sDB
crReport.Database.Tables(1).ConnectionProperties.Add "User ID", sDBUsr
crReport.Database.Tables(1).ConnectionProperties.Add "Password", sDBPwd
Thank you for your time. Any ideas on how to resolve this issue will be greatly appreciated, as always. SGarv