Results 1 to 4 of 4

Thread: ***RESOLVED***Crystal Reports problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Georgia
    Posts
    337

    ***RESOLVED***Crystal Reports problem

    I have just installed Crystal Reports Dev edition with VB6 Enterprise.

    the company that originally did a number of reports was in an ASP situation. I'm trying to use those reports for a VB app. All the reports have a parameter wanting an ID number which references the SQL table to the record the user is viewing. What I need to know is how to pass the parameter information to the Crystal Report when the user clicks a command button. Here is what I need to pass to the Crystal report parameter

    SELECT * from tblClaim WHERE ID = '" & frmAdminInfo.txtIDref.Text & "'"

    That way the report will be generated based on that record only.

    Any help would be appreciated. There are bunches of reports to be modified so if I can get an answer to this I'm well on my way to converting the reports to work in the windows app.

    Thanks for any and all help
    Last edited by Tailgun; Jul 3rd, 2002 at 05:15 AM.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Georgia
    Posts
    337
    ok I at least got this far

    Private Sub Form_Load()
    Screen.MousePointer = vbHourglass
    CRViewer1.ReportSource = Report
    Report.ParameterFields(1).AddCurrentValue frmAdminInfo.txtIDref.Text
    CRViewer1.ViewReport
    Screen.MousePointer = vbDefault

    End Sub

    Now I have a type mismatch
    The ID field is numeric and the txtIDref.Text field is also numeric
    but I get a type mismatch any suggestions ??

  3. #3
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043
    Check Report.ParameterFields(1)
    It should be Report.ParameterFields(0).
    oh1mie/Vic


  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Georgia
    Posts
    337
    Thanks for your help. I finally got it resolved using this.

    Report.ParameterFields(1).AddCurrentValue
    CDbl(frmAdminInfo.txtIDref.Text)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width