Results 1 to 6 of 6

Thread: pass value in crystal report through textbox

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    4

    Exclamation pass value in crystal report through textbox

    During pass value in crystal report through textbox

    Error : Subscripition Out of range

    I want to pass the text value in field...bill_amt of crystal report
    report1.rpt is crystal report

    for this i used-----
    Dim APPL As CRAXDRT.Application
    Dim rpt As New CRAXDRT.Report

    Set APPL = New CRAXDRT.Application

    x = App.Path & "\" & "report1.rpt"
    Set rpt = APPL.OpenReport(x, 1)
    rpt.DiscardSavedData
    rpt.Database.SetDataSource RS
    rpt.ParameterFields(bill_amt).Value = Text5.Text 'subscript out of range

    'cryst is crystal report
    Cryst.ReportSource = rpt
    Cryst.ViewReport

    how this problem resolved???

  2. #2
    Addicted Member
    Join Date
    Jan 2001
    Location
    MPLS
    Posts
    187

    Re: pass value in crystal report through textbox

    Looks like maybe your missing quotes in the parameter field name, thus causing the subscript out of range. Try

    rpt.ParameterFields("bill_amt").Value = Text5.Text

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    4

    Re: pass value in crystal report through textbox

    Thanks for ur reply

    But I hv already used this and when i used " " then error occur

    type mismatch....

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    4

    Re: pass value in crystal report through textbox

    pls Reply.....
    if someone know how to pass the textbox value in parameter field value of crystal report through vb programming....

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

    Re: pass value in crystal report through textbox

    I have always used:

    Report.ParameterFields.ITEM(1).AddCurrentValue glbDate
    Report.ParameterFields.ITEM(2).AddCurrentValue glbDate1
    ===================================================
    If your question has been answered, mark the thread as [RESOLVED]

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2010
    Posts
    4

    Resolved <RESOLVED>Re: pass value in crystal report through textbox

    Quote Originally Posted by Pasvorto View Post
    I have always used:

    Report.ParameterFields.ITEM(1).AddCurrentValue glbDate
    Report.ParameterFields.ITEM(2).AddCurrentValue glbDate1
    thanks for ur reply..... Now my problem has solved..actually main problem is in datatype of crystal report...

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