Hi Ya'll ,
I would be really greatfull if anyone could help me out with this problem. I'll include as much information as I can.
In our deployed application (wrote in vb.net using vs2005), we have a lot of crystal reports set up. There are no problems with any other report. We have never seen this problem before, and I have exhausted every option I can think of to fix it.
Firstly, this is the error message:
This is the function that binds data to the report
Public Function LoadServiceHistory(ByVal Registration As String) As rptServiceHistory
Dim oVehicle As New clsVehicle
oVehicle.Registration = Registration
'fill job history datatable if at least 1 line of job history found for the booking...
If oVehicle.ServiceHistoryMostRecentFirst.Count > 0 Then
' Get service history for car in this booking
Dim dtServiceHistory As dsVehicle.VehicleDataSet.VEHICLE_SERVICE_HISTORY_RECORDDataTable = _
oVehicle.ServiceHistoryMostRecentFirst(False)
' Get service details
Dim dtServiceDetails As New dsVehicle.VehicleDataSet.Vehicle_Service_history_detailsDataTable
For Each row As dsVehicle.VehicleDataSet.VEHICLE_SERVICE_HISTORY_RECORDRow In dtServiceHistory
Dim dtTempServiceDetails As dsVehicle.VehicleDataSet.Vehicle_Service_history_detailsDataTable = _
oVehicle.ServiceDetails(CType(row.Mileage, Integer), row.Invoice, row.JobNumber)
For Each detailsRow As dsVehicle.VehicleDataSet.Vehicle_Service_history_detailsRow In dtTempServiceDetails
detailsRow.Job_Number = row.JobNumber
dtServiceDetails.ImportRow(detailsRow)
Next
Next
Dim tReport As New rptServiceHistory
tReport.Subreports(0).SetDataSource(CType(dtServiceDetails, DataTable))
tReport.SetDataSource(CType(dtServiceHistory, DataTable))
If Trim(Registration) = "" Then
tReport.SetParameterValue("Registration", "Unregistered Vehicle")
Else
tReport.SetParameterValue("Registration", Registration)
End If
pLoaded = True
pReport = tReport
Return tReport
Else
pLoaded = False
Return New rptServiceHistory
End If
End Function
If anyone has a suggestion, I would be very happy to hear it.
Best regards