Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using one report for multiple databases

Status
Not open for further replies.
Feb 16, 2001
44
CA
Hello,

I have 1 report that I need to use for several databases. I am using crystal reports 10 developer edition and preview it with ActiveX Viewer on the web using asp and RDC component. In asp file I am changing database connection info at runtime.
The problem is that sometimes the report is using wrong database.

Here are lines I am using to setup db connection:

set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo sid ,"", cstr(user), cstr(pwd)

I,also, used :
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.ConnectionProperties.DeleteAll
crtable.ConnectionProperties.Add "Server", cstr(sid)
crtable.ConnectionProperties.Add "User ID", cstr(user)
crtable.ConnectionProperties.Add "Password", cstr(pwd)

But it still shows data from wrong database.
Does anybody knows why and how to resolve it?

Thank you.
Julia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top