- Database logon screen at runtime (VS .NET 2008).Main report runs with no errors when the subreport is removed.
- Subreport runs with no errors when run as a main report.
- Logon screen only appears when the subreport is inserted into the main report.
Reproducing the Issue
- Structure the report as follows.
- Connection 1 to ODBC datasource, database 'A', using SQL authentication
- Connection 2 to ODBC datasource, database 'B', using NT authentication
- Connection 3 to ODBC datasource, database 'C' using SQL authentication
- In Visual Studio .NET connect the report to the datasource as described in Crystal Reports .NET SDK help files
The NT authentication is being propagated to the subreport.
Verify the database after the database connection is set to the subreport.
Dim mySubreport As ReportDocument = CRReport.OpenSubreport("SUB3.rpt")
conn = mySubreport.DataSourceConnections.Item(0)
conn.IntegratedSecurity = False
conn.SetConnection("Data5", "Database3", "sa", "PW")
myCrystalReportViewer.ReportSource = CRReport
KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To