Hi, I have a dataset attached to my crystal report which returns specific results. When testing the query my results return my specific records. However, when I run it in my crystal report I get all records in my table. It is as if my sql query is not being recognized by the report? Im using vb.net 2008.
The code for my report is below:
Dim ds As New DataSet
Dim sqlString As String = "SELECT l.JobNo,l.Description,l.Solution,l.JobLoggedDate,l.DateComplete,l.Parts,l.RaisedBy," & _
"l.Customer,c.Company FROM tblJobsList l INNER JOIN tblCustomers c ON l.Customer = c.ID " & _
"WHERE c.Company = '" & gbCustomer & "' AND l.JobLoggedDate >= '" & ScottFunc.ConvertDate(gbFromDate) & "' " & _
"AND l.DateComplete <= '" & ScottFunc.ConvertDate(gbToDate) & "' ORDER BY l.JobLoggedDate "
'Create a sql adapter from criteria entered then fill the dataset
Dim daService As New SqlDataAdapter(sqlString, myConnection)
'Fill adapter and assign table
'Set SQL to Report
'Assign the Report to show to the viewer
crViewer.ReportSource = rptMonthlyReport1
Any help is appreciated.