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 AX (Archived)

SSRS Date Expression

(0) ShareShare
ReportReport
Posted on by 765

I want to look at the field salesline.shippingdaterequested and if that date falls in any one of the next three full months (essentially 11/1/2017 - 01/31/2018) include it.  I can't seem to get the expression right to do this.  Any help would be appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    My understanding from your requirement is that you want to filter the data which falls in next three full months. I feel you can achieve your requirement either by adding the required condition in the dataProvider class(processReport method) or adding it as a range in the report query.

    Your code would like below in inserttmp prefix method that gets called in processreport method of data provider class.

        TransDate startDate, endDate;
        startDate = mkDate(1,11,2017);
        endDate = mkDate(1,11,2017);
        
        if (_salesline.shippingdaterequested >= startDate || _salesline.shippingdaterequested <= endDate)
        {
            //tempTable.Insert();
        }


  • Verified answer
    Andrew Xu Profile Picture
    3,877 on at

    Hi claganson,

    The SSRS date expressions of

    First date next month = DateAdd("D",1 - day(Today()), DateAdd("M", 1, Today()))

    Last date next 3 month = DateAdd("D", 0 - day(Today()), DateAdd("M", 4, Today()))

    so to check if your date falls in the range,

    =IIF(YOUR DATE >= DateAdd("D",1 - day(Today()), DateAdd("M", 1, Today())) and YOUR DATE <= DateAdd("D", 0 - day(Today()), DateAdd("M", 4, Today())), "In range", "Not in range")

  • claganson Profile Picture
    765 on at

    Exactly what I needed thank you for your help.

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 AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans