Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Query Regarding SSRS Report

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Query Regarding SSRS Report

    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

  • RE: Query Regarding SSRS Report

    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.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Query Regarding SSRS Report

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans