I'm relatively new to creating reports via crystal reports. I get a message "Invalid Report Source" when running the following code.
It was my understanding that you could use a data set as a report source. In fact my code is based on a code example from MS(the code example used oledb but my database is sql server).
'setup connection for crystal report
Dim scnReport As New SqlConnection
scnReport.ConnectionString = CONN
'setup sql command for crystal report
Dim scmdReport As New SqlCommand
scmdReport.Connection = scnReport
scmdReport.CommandType = CommandType.Text
scmdReport.CommandText = "SELECT * FROM vwCheckDisposition"
'setup data adapter for crystal report
Dim sdaReport As New SqlDataAdapter
sdaReport.SelectCommand = scmdReport
'setup instance of dsChecks
Dim dsReportData As New dsChecks
sdaReport.Fill(dsReportData, "vbCheckDisposition")
'bind crystal report object with data to the form viewer
crvChecks.ReportSource = sdaReport
It was my understanding that you could use a data set as a report source. In fact my code is based on a code example from MS(the code example used oledb but my database is sql server).
'setup connection for crystal report
Dim scnReport As New SqlConnection
scnReport.ConnectionString = CONN
'setup sql command for crystal report
Dim scmdReport As New SqlCommand
scmdReport.Connection = scnReport
scmdReport.CommandType = CommandType.Text
scmdReport.CommandText = "SELECT * FROM vwCheckDisposition"
'setup data adapter for crystal report
Dim sdaReport As New SqlDataAdapter
sdaReport.SelectCommand = scmdReport
'setup instance of dsChecks
Dim dsReportData As New dsChecks
sdaReport.Fill(dsReportData, "vbCheckDisposition")
'bind crystal report object with data to the form viewer
crvChecks.ReportSource = sdaReport