-
Mar 31st, 2010, 07:28 AM
#1
Thread Starter
New Member
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???
-
Apr 1st, 2010, 02:54 PM
#2
Addicted Member
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
-
Apr 1st, 2010, 11:43 PM
#3
Thread Starter
New Member
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....
-
Apr 3rd, 2010, 07:13 AM
#4
Thread Starter
New Member
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....
-
Apr 6th, 2010, 12:06 PM
#5
PowerPoster
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]
-
Apr 9th, 2010, 12:30 AM
#6
Thread Starter
New Member
<RESOLVED>Re: pass value in crystal report through textbox
Originally Posted by Pasvorto
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|