Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey,

 

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

 

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

 

Here's the code that is supposed to fire the report:

 

        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? I've been searching for hours and can't find the solution.

 

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

 

Thanks,

 

Kahuna

The three most important things in life: God, your family, and the Green Bay Packers -- Not necessarily in that order.

Winning is not a sometime thing. You don't win once in a while, you don't do things right once in a while, you do them right all the time. Winning is a habit. Unfortunately, so is losing.

-- Vincent T. Lombardi
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...