locked
Add a Month Parameter to report RRS feed

  • Question

  • User-1210839387 posted

    using report builder 2.0

    I have to add a "Month" parameter to a report so the user can select the month and the database will be queried to return orders that were created in that month.

    I know how to add the parameter however I am trying to figure out how to set (in an expression?) the avaibable months for the user to select.

    Also, I am trying to figure out how to set the values so when the user selects a month I am able to pass the information to my query.

    I assume that I will need the following:

    1.  FromDate (Ex:  Sept 1, 2011)

    2. ToData (ex: Sept 30, 2011)

    so that I can do a "BETWEEN" query.

    Please advise on how to do these 2 things.

    thanks

    MC

    Tuesday, July 26, 2011 10:11 AM

Answers

  • User1471008070 posted

    Hi,

    To your first requirement "how to set (in an expression?) the avaibable months for the user to select", I think you should create a dataset for your parameter's default value and available value, please read this Tutorial: Adding Parameters to a Report (SSRS) at this link http://msdn.microsoft.com/en-us/library/aa337432.aspx 

    To your second requirement "How to pass the information to my query", you should create two parameters FromDate and ToData, then you can pass these two parameters to your T-SQL query, you can also pass them as filter to filter your dataset or data region.

    For more information about Adding Dataset Filters, Data Region Filters, and Group Filters (Report Builder 3.0 and SSRS), please see http://technet.microsoft.com/en-us/library/dd239395.aspx 

    Thanks,
    Challen Fu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 27, 2011 11:31 PM