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
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