G
Guest
I have a Crystal Report created by a coworker in Crystal Reports XI. The
report uses an ODBC DSN to connect to the SQL Server database.
I've figured out how to set the various parameters for the report, how to
point the Report Viewer to the .RPT file, etc.
The last step (?) for me is to provide a SQL username and password since the
report prompts for one when it runs.
I've reviewed the documentation online but can't seem to find an answer to
what feels like a pretty simple question.
Here's a bit of the code I'm using so far:
Dim frm As New frmReport
Dim docReport As New ReportDocument
docReport.Load ("{fullpath was long}Price_Comparison.rpt")
docReport.SetParameterValue("Company", "SR")
docReport.SetParameterValue("Branch", "SR")
docReport.SetParameterValue("Show_All", True)
frm.CrystalReportViewer1.ReportSource = docReport
frm.Show()
report uses an ODBC DSN to connect to the SQL Server database.
I've figured out how to set the various parameters for the report, how to
point the Report Viewer to the .RPT file, etc.
The last step (?) for me is to provide a SQL username and password since the
report prompts for one when it runs.
I've reviewed the documentation online but can't seem to find an answer to
what feels like a pretty simple question.
Here's a bit of the code I'm using so far:
Dim frm As New frmReport
Dim docReport As New ReportDocument
docReport.Load ("{fullpath was long}Price_Comparison.rpt")
docReport.SetParameterValue("Company", "SR")
docReport.SetParameterValue("Branch", "SR")
docReport.SetParameterValue("Show_All", True)
frm.CrystalReportViewer1.ReportSource = docReport
frm.Show()