Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Incorrect Log On Parameters Post Reply Post New Topic
Author Message
HairyMike
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 8
Quote HairyMike Replybullet Topic: Incorrect Log On Parameters
    Posted: 19 Mar 2008 at 2:27am

Hi Ya'll Smile,

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

IP IP Logged
medmondson
Newbie
Newbie


Joined: 31 Jan 2008
Location: United States
Online Status: Offline
Posts: 2
Quote medmondson Replybullet Posted: 07 May 2008 at 8:33am
Do you know which line is throwing the exception?
I dream of .Net!
IP IP Logged
HairyMike
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 8
Quote HairyMike Replybullet Posted: 07 May 2008 at 8:36am
Thanks for replying...  I've actually managed to solve this by deleting the bindings to my datatables and recreating them.
 
Thanks again :)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.