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
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