Database Logon error - Crystal Reports

SteveoAtilla

Well-known member
Joined
Dec 22, 2004
Messages
79
Location
The Frozen Tundra
Hey,

I know this has been asked multiple times, but Ive got a page with a Crystal Report on it.

The .rpt file was created externally and added to the project.

Heres the code that is supposed to fire the report:

Code:
        Dim P1 As New ParameterFields
        Dim OrdNum As New ParameterField
        Dim CheckNum As New ParameterField
        Dim OrdNumVal As New ParameterDiscreteValue
        Dim CheckNumVal As New ParameterDiscreteValue
        Dim crTableLogonInfos As New TableLogOnInfos
        Dim crTableLogonInfo As New TableLogOnInfo
        Dim crConnectionInfo As New ConnectionInfo
        Dim CrTables As Tables
        Dim CrTable As Table
        Dim TableCounter

        With crConnectionInfo
            .ServerName = "PMASQL"
            .DatabaseName = "PMTravelBinder"
            .UserID = "IKON_App"
            .Password = "~~~~~~"
        End With

        crTableLogonInfo.ConnectionInfo = crConnectionInfo

        OrdNum.ParameterFieldName = "InputProductionOrder"
        OrdNumVal.Value = Session("ProdOrdNum")
        OrdNum.CurrentValues.Add(OrdNumVal)
        P1.Add(OrdNum)
        crvChecklist.ParameterFieldInfo = P1

        CheckNum.ParameterFieldName = "InputChecklistNumber"
        CheckNumVal.Value = Session("ChecklistName")
        CheckNum.CurrentValues.Add(CheckNumVal)
        P1.Add(CheckNum)
        crvChecklist.ParameterFieldInfo = P1

        crvChecklist.LogOnInfo.Add(crTableLogonInfo)
        DataBind()
What am I missing? Ive been searching for hours and cant find the solution.

BTW, Im on VS2003, and I believe the .rpt file is a Version 11.

Thanks,

Kahuna
 
Back
Top