I am using crystal report 7.0 & want to connect crystal report dynamically to different server and database during runtime. All these database / servers are having same structure / tables.
I am using the following code, but it is not working. I have to use the set location option and change server/database. But I want this to happen dynamically with any server/database names passed from vb front end.
Dim clsCR As New clsCrystalAPI
............
With clsCR
.Database = gstrDatabase
.Password = gstrPassword
.Server = gstrServer
............
End WithWhat is clsCrystalAPI, a custom wrapper for one of the Crystal APIs?
Anyway, one way could be to scroll thru all your tables and use SetLogonInfo on each table. If you also have subreports, you will have to locate them, open, and apply SetLogonInfo to the tables.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment