Results 1 to 2 of 2

Thread: filtering report using form input

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Posts
    6

    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

  2. #2
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    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
  •  



Click Here to Expand Forum to Full Width