Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change datasource at runtime. CR9.
Message
From
29/06/2006 20:32:33
 
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
How to change datasource at runtime. CR9.
Miscellaneous
Thread ID:
01132957
Message ID:
01132957
Views:
77
Hello Craig,

I asked a question some days ago but didn't get answers. This is about changing the datasource at runtime for a Crystal report.

More details.

We design a report based on a stored procedure which is stored in a given server and database, say Test_Server and Test_Database. It runs fine from development environment, but of course I would need to run the report on production on a different server and database without having to re-edit and change the report specifications. I need to do it by just changing de DSN file the .rpt is referring to.

What properties or what code do I have to implement? I have tried for example:
oCProps.Add("FILEDSN", MyDSNFile)

loRPT.Database.Tables(n).ConnectBufferString= 'FILEDSN=H:\MyDSNFile)
and so on, but nothing seems to work. The report still tries to find the development database, and if we rename it , we get errors like "Failed to open rowset" ,


I also applied an update named CR90MAINWIN_EN_200603 without success.


Please some ideas,

Thanks

Juan C.
Next
Reply
Map
View

Click here to load this message in the networking platform