web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

conditionally running reports

(0) ShareShare
ReportReport
Posted on by 165

Hi All,

I have a requirement to conditionally run a different report(PurchPurchaseOrder report) design based on a flag on the PurchTable.

I've added the new design in the Print Management settings to include the new report design.

And i've modified the code in the controller class to conditionally run a design based on a flag - see code below

if(flag)
{
controller.initArgs(_args, ssrsReportStr(PurchPurchaseOrder, Report));
}
else
{
controller.initArgs(_args, ssrsReportStr(PurchPurchaseOrder, Report_TEST));
}

However when i run the report, it's always running the original design. Hope my explanation is clear.

Any help/suggestion will be highly appreciated.

thanks

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Hi,

    You may want to try post event handler for method called outputreport() for your controller class. If post event handler do not work, try Chain of command. Please have a look at one of my blog-post from AX2012.

    community.dynamics.com/.../running-a-different-design-of-a-report-part-1

    I can understand that things have went to extensions from overlaying but I am optimistic about the solution.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans