web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Query Regarding SSRS Report

(0) ShareShare
ReportReport
Posted on by 340

Hi All,

I am doing a SSRS Report which have 2 Input parameters(Select Month, Select Year). I am giving a scenario so that its easy to understand.

Select month = 02 and Select Year = 2018


while running the Report it will display the data from March 2017 to Feb 2019.

How i be able to show that because i am facing issue with how to consider Input Parameter 02 as Feb and Year=2018 

while showing data. Means can anyone help me with providing 1 expression that how i show 1st record as March 2017 in Report.

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    Just to clarify, should the report always display data for a range of 24 months, starting from 11 months before the date made from the Month and Year ? And is the field to filter on a DateTime field in CRM ?

    And just to confirm, is this a Fetch report, or a SQL report - this matters as the format for providing dates is slightly different for each

  • NILANKA SEKHAR PAUL Profile Picture
    340 on at

    Thanks David. Its a FetchXML based Report. The report should display the data based on input Parameters such as if Selected Month=02 and Year=2017 then the output should returns the data from March 2016 to Feb 2018.

  • Community Member Profile Picture
    on at

    Hi Nilanka,

    You have to create static parameter Month whose Data type will be Integer and Specify Values like in following ways :

    Label Value

    Jan     01

    Feb    02

    Mar   03

    In the Same way create parameter Year whose Data type will be Integer and Get values from a query. You have to create a dataset i.e year in which you can create a calculated fields named "Select Year = Year(datefield");

    Now Applied both parameters filter expression in main dataset or report tablix properites in following way;

    Year(field!createdon.value)

    operator = between

    (@Parameters!Year.Value -1) to (@Parameters!Year.Value)

    Month(field!createdon.value)

    operator = between

    (@Parameters!Month.Value) to (@Parameters!Month.Value + 1)

    Thanks!

    Santa

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans