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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to Pass parameter to controller class using Batch

(0) ShareShare
ReportReport
Posted on by 10

Hi,

How to give the input parameters in SSRS report dynamically while it runs in batch in AX 2012.  For example, I've to send a mail with report attachment in batch .In that report, there is Date parameters.If I run a batch today means it retrieves the records till today(02-12-2019). After one or two days,if report runs automatically through batch means it retrieves the record only till 02nd. For me it should show till the current date.  Please help me to solve this.

Thanks 

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    If the parameter is a field in the report dialog, you can't have it work dynamically. In such case you have to develop a parameter that is not a date, but rather "number of days". If the parameter is zero, run the report for "today". If the parameter is one, run the report for "today -1" and so on.

    You can use dynamic date for the query criteria for the report. You can input "T" for today's date.

    docs.microsoft.com/.../advanced-filtering-query-options

  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    You can use SysQueryRangeUtil::currentDate()  or (Day(0) as shown here axinventory.blogspot.com/.../moving-date-ranges-for-queriescuesbatch.html

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 657

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 453 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 190 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans