web
You’re offline. This is a read only version of the page.
close
Skip to main content
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,160 Moderator on at
    RE: How to Pass parameter to controller class using Batch

    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,284 on at
    RE: How to Pass parameter to controller class using Batch

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,964

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 823 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 564 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans