Results 1 to 3 of 3

Thread: vb6 with crystal report 9

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    2

    vb6 with crystal report 9

    hi
    i have 1 comobo box for name and 2 text(date_from , date_to) and 1 buttun
    i wont to pass aparmeter for (combox and text1 and txt2) from vb6 to crystal report 9
    it must shoun in the report
    name,date from.date_to,name of trane
    wher i can mad conditon or qury(give the name of train for this emply between date_from and date_to )
    how can i made the code
    how i mae aparametrs

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    2

    Re: vb6 with crystal report 9

    hi
    i have 1 comobo box for name and 2 text(date_from , date_to) and 1 buttun
    i wont to pass aparmeter for (combox and text1 and txt2) from vb6 to crystal report 9
    it must shoun in the report
    name,date from.date_to,name of trane
    wher i can mad conditon or qury(give the name of train for this emply between date_from and date_to )
    how can i made the code
    how i mae aparametrs
    Rate this post

  3. #3
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: vb6 with crystal report 9

    Add teh paramters to your report.
    In your VB code do something like this:

    Code:
    Set Report = crxApplication.OpenReport("Z:\DAD\BOLSamples.rpt", 1)
    For Each crxDatabaseTable In Report.Database.Tables
        crxDatabaseTable.ConnectionProperties("user id") = "sa"
        crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
    Next crxDatabaseTable
    Report.PaperOrientation = crDefaultPaperOrientation
    '
    '----------
    'parameters
    '----------
    '
    Report.ParameterFields.ITEM(1).AddCurrentValue Trim(txtCustomer.Text)
    Report.ParameterFields.ITEM(2).AddCurrentValue Trim(txtShipDate.Text)
    Report.ParameterFields.ITEM(3).AddCurrentValue Trim(txtBOL.Text)
    Report.ParameterFields.ITEM(4).AddCurrentValue Trim(txtShipToName.Text)
    ===================================================
    If your question has been answered, mark the thread as [RESOLVED]

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