Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to Pass parameter to controller class using Batch

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 

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 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

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 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

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans