none
ReportViewer Control Monthly Report RRS feed

  • Question

  • Hi i am new to ReportViewer control,

    I have a table which has a column for date. I want to do a report where the user will
    enter the start /end date e.g 1/5/2007 ---- 31/5/2007 and the report will contain details
    from for the input time span

    Its is possible with this control.

    Rgds
    RD
    Sunday, May 6, 2007 4:24 PM

All replies

  • Yes it is.

     

    You simply have two report parameters @StartDate and @EndDate or similar.

    the where clause for your query would then be something like

     

    WHERE My_Date_Column BETWEEN @StartDate AND @EndDate

     

    Then in the report parameter section of your report you can choose the prompts, etc

    Monday, May 7, 2007 4:14 AM
  • HI

    Do I have to add the WHERE close in the tableadapter or in the reportviewer , I am using access database.

    Thanks for yr quick reply
    Monday, May 7, 2007 3:26 PM
  • Ok I presume you are using the ReportViewer in local mode which means that you must provide the data for the report yourself.

     

    This means the following:

     

    You must add report parameters to your report definition

    You must provide an interface to prompt the user for the values for these parameters

     

    When the user has provided the values you must then apply those values to the parameters in the query and then execute your query to get the data

     

     

    Tuesday, May 8, 2007 1:27 AM
  • thanks, i think you are right,

    thanks for your advice

    rgds

    ritesh

    Tuesday, May 8, 2007 11:07 AM