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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change location in deployment environment

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
Hi,

I have made a report in crystal report 9.0 (may 2003) , to which i pass
logoninfo (server, database, user, pwd) from my VB.NET / ASP.NET
application (Visual studio 2003).(we work with ADO.NET) It works fine but if i pass a string of a different database
(than in my development environment), the report should show the data in
that database, but it doesn't happen. I get the error: Unable to connect:
incorrect log on parameters.
How to accomplish this? The table structure in both databases is exactly
the same.
1.) We don't save the data with our report.
2.) We logon to each table
Dim crReportDocument As ReportDocument
crReportDocument.SetDatabaseLogon(loginParam.userID, loginParam.password,
loginParam.serverName, loginParam.databaseName)
.... + for all our tables we connect to the database
For Each tbCurrent In crReportDocument.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
tliCurrent.ConnectionInfo = coninf
tbCurrent.ApplyLogOnInfo(tliCurrent)
tbCurrent.Location = tbCurrent.Name
Next tbCurrent
and even for each subreport we do the same.
.....

We receive an error at : tbCurrent.Location = tbCurrent.Name

THX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top