SSRS Report | Report Month Parameter shows data only for current year

Maurice Timoti 1 Reputation point
2022-01-24T23:41:07.513+00:00

Hi There,

SQL & SSRS newbie.

I have an existing SSRS report with a ReportMonth parameter that only shows the current calendar month. (Jan 22) Ideally I want this report to look at the entire financial year (e.g. March 2021 - April 2022). The parameter runs off the following query. Any help is much appreciated:

SELECT DISTINCT
[PERIOD_SHORTNAME]

FROM [Database].[dbo].[PERIOD_STATUS]
where datepart(YEAR, GETDATE())= datepart(Year,STOPDATE)

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Isabellaz-1451 3,616 Reputation points
    2022-01-25T05:30:14.863+00:00

    Hi @Maurice Timoti

    I think you can add two parameters ,first one is startdate and second one is enddate,from that you can have a time boundary ,then use it to filter the data,here is my steps,you can have a try.

    1. my test table is like
      168127-test-tabledefine.png

    2.create a blank report,set the parameter
    168064-test-parameter.png

    3.define the dateset
    168137-test-dateset.png

    Best Regards,
    Isabella


    If the answer is the right solution, please click "Accept Answer" and upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.