|
-
May 3rd, 2007, 05:49 AM
#1
Thread Starter
New Member
filtering report using form input
hi,
i have developed windows application that displays something using crystal report viewer, the problem i have now is how to give the user of the system control on things he has to view for example i have date range on my form where he can select the range. So how do i code that on my application?
regards,
boreli
-
May 11th, 2007, 12:00 AM
#2
Addicted Member
Re: filtering report using form input
For example if u have two dates then the code will be like this.
Dim rptPDF As New ReportDocument
rptPDF.Load(Server.MapPath("ReconcileFundingBalance.rpt"))
If txtDateFrom.Text <> "" Then
rptPDF.SetParameterValue("@pDateFrom", txtDateFrom.Text)
Else
rptPDF.SetParameterValue("@pDateFrom", Nothing)
End If
If txtDateTo.Text <> "" Then
rptPDF.SetParameterValue("@pDateTo", txtDateTo.Text)
Else
rptPDF.SetParameterValue("@pDateTo", Nothing)
End If
Thanks and Regards,
Muhammad Abbas
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
|