I have a Crystal XIr2 Report that reports on data from a SQL Server VIEW. Using the Database expert I created a connection to that view & inserted the fields. (Actually this report, as are about 75 others, are being upgraded from CR V7 but the same concept applies).
The problem I'm encountering is that the DataBase Expert is creating a fully qualified link to my test database that I can't seem to change at run time. The other reports that report on data from tables don't have this problem.
When using the Show SQL Query option in CR is shows the Select statement as I'd expect. but the From Clause shows: FROM "TESTDB"."dbo"."FullPallet" "FullPallet"
For my other reports that report on tables only the From clause would show something similar to: FROM "Table1l" "Table1"
Since this app is deployed to multiple customers their servers and DBs will have varying names so at run time i send a connection string that works for all the other reports expect the ones that report on VIEWS. The connection string is thus: crReport.Database.Tables(1).SetLogOnInfo SqlServerName$, SqlCatalogName$, "UserID", "Password"
If i connect my app to a different DB on the same SQL server the report will find the TestDB & try to report on it. Obviously producing erroneous data. If i connect to a different SQL Server that has no TestDB, it produces an error that it can not find my TestDB.
I also tried to replace the report's SQL Statement by sending my own to it using:
crReport.SQLQueryString = "SELECT FullPallet.ShipOrder, FullPallet.SeqNum, FullPallet.Description FROM FullPallet FullPallet"
(FullPallet is the name of the View)
and it still fails on looking for the TestDB.
BTW - the reports are being called from a VB6 app, if that helps any.
So any help would be greatly appreciated.