I have been using the VB.NET 2003 and CrystalReportViewer control to allow users to access a Crystal Report ver 8.5. The viewer has worked without a problem using this login process from my VB app:
Dim crReport As New ReportDocument
crReport.Load("c:\testv9.rpt")
Dim tbCurrent As Table
Dim tliCurrent As TableLogOnInfo
For Each tbCurrent In crReport.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = "TestServer"
.UserID = "sa"
.Password = "testing"
.DatabaseName = "TEST"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next
CrystalReportViewer1.ReportSource = crReport
I recently found a need to upgrade the report to Crystal Reports 9 because of some additional functionality with blog fields (and since we already owned ver 9, why not?).
After I open and save the original report in Crystal Reports ver 9 (with out making any additional changes), and after successfully testing the report from within Crystal Reports, I find that my VB app can no long login to the report.
After a lot of trial and error, I think I have narrowed the problem down to SQL views. If I create a very simple new report in Crystal Reports ver 9 using tables "tableA" and "tableB", everything works fine both in Crystal Report and in my VB app. If I create a new view "viewB" that is simply "select * from tableB" and use it in the report instead of "tableB", it works fine in Crystal Reports, but gives me the login screen when using my VB app.
I have installed the latest service packs that I can download for both Visual Studio and Crystal Reports 9, but still get the same results. I've seen a number of messages online about login issues with Crystal Reports, but none that touch on the problem that I'm having. Anyone else have any ideas?
Thanks
Sheldon
Dim crReport As New ReportDocument
crReport.Load("c:\testv9.rpt")
Dim tbCurrent As Table
Dim tliCurrent As TableLogOnInfo
For Each tbCurrent In crReport.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = "TestServer"
.UserID = "sa"
.Password = "testing"
.DatabaseName = "TEST"
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next
CrystalReportViewer1.ReportSource = crReport
I recently found a need to upgrade the report to Crystal Reports 9 because of some additional functionality with blog fields (and since we already owned ver 9, why not?).
After I open and save the original report in Crystal Reports ver 9 (with out making any additional changes), and after successfully testing the report from within Crystal Reports, I find that my VB app can no long login to the report.
After a lot of trial and error, I think I have narrowed the problem down to SQL views. If I create a very simple new report in Crystal Reports ver 9 using tables "tableA" and "tableB", everything works fine both in Crystal Report and in my VB app. If I create a new view "viewB" that is simply "select * from tableB" and use it in the report instead of "tableB", it works fine in Crystal Reports, but gives me the login screen when using my VB app.
I have installed the latest service packs that I can download for both Visual Studio and Crystal Reports 9, but still get the same results. I've seen a number of messages online about login issues with Crystal Reports, but none that touch on the problem that I'm having. Anyone else have any ideas?
Thanks
Sheldon