none
Date Expression in SSRS RRS feed

  • Question

  • can anyone please help me out for the below task.

    I want to create below two date  parameters 

    1.At the runtime user will select data from 1/1/2015 to 1/1/16 but the report should display data from 1/1/2015 to 31/12/15.

    2.Normal date filter at runtime to select date for exact entered dates.

    It should allow to print only one of the above conditions at a time like either condition 1 or condition 2

    Thanks

    Thursday, July 2, 2020 3:02 PM

Answers

  • Hi Kritika256,

    You can try to add date parameter to filter date.

    For example, you can add the following query to the dataset:

    WHERE date >= @StartDate

    AND date < @EndDate

    Then you can change the Data Type of parameter StartDate and EndDate to Date\Time in Parameter Prooerties.

    Please refer the following article which might help:

    Add a Date Range Dataset in SQL Server Reporting Services

    Report Parameters

    If you have any question, please feel free to let me know.

    Best Regards,

    Amelia


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Kritika256 Friday, July 3, 2020 10:29 AM
    Friday, July 3, 2020 2:19 AM

All replies

  • Hi Kritika256,

    You can try to add date parameter to filter date.

    For example, you can add the following query to the dataset:

    WHERE date >= @StartDate

    AND date < @EndDate

    Then you can change the Data Type of parameter StartDate and EndDate to Date\Time in Parameter Prooerties.

    Please refer the following article which might help:

    Add a Date Range Dataset in SQL Server Reporting Services

    Report Parameters

    If you have any question, please feel free to let me know.

    Best Regards,

    Amelia


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Kritika256 Friday, July 3, 2020 10:29 AM
    Friday, July 3, 2020 2:19 AM
  • Thanks a lot..!  Amelia.
    • Edited by Kritika256 Friday, July 3, 2020 9:19 AM
    Friday, July 3, 2020 9:18 AM
  • Hi Kritika256,

    Did the answer above help you?

    Please feel free to let us know if you have any other question.

    If you find any post in the thread is helpful, you could kindly mark it as answer. This would benefit the community, and encourage the community member to keep working on your issues.

    Best Regards,

    Amelia


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 3, 2020 9:28 AM