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)

Add parameters to report based on AOT Query

(0) ShareShare
ReportReport
Posted on by

Hello!  It has been a long time and I've come back to the AX world and having trouble with report and parameters.  I've never done this before but I did dabble a bit in SSRS reports too long ago.

It seemed to be a straight forward with multiple relations from the cust table to the LogisticsPostalAddress table and then a table that contains a createdDateTime field that I would need as a parameter as a "from and to". 

This is what the parameters should look like

5460.1.png

I created the query in the AOT since i didn't think ahead that the parameters would give me issues. 

This is the problem (one of them?)  My AOT query does not have dataset parameters.  I'm not sure how to do this.

4812.2.png

So the report looks like this when I go to preview in Visual Studio and the parameter doesn't look like what I should be aiming for.

7536.3.png

Advice needed. 

Should I stop trying to figure out how to add parameters to work probably against the Query in Visual Studio and go back to the drawing board and re-create this using the Report Data Provider Class?  

I have found some posts by searching but I think I need to step back and figure out what's the best way to go about doing this. 

Thanks for your time and advice.

*This post is locked for comments

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

    Your observation is correct.

    Every time when someone with deploy ax report from AOT or using build of VS, it will do following

     

    1. Delete old .rdl file from reporting server (in this step your custom changes of VS level are gone)

    2. Re-deploy report using xpo of AOT. (Your report in this case have no date parameter inside AX. so New deployment will no more have that parameter which you added previously using VS.) 

      To fix this you have two choices 

    1. If report is based on query, you can right click query and add ranges on query itself, so that each time report will run the ranges will appear on dialog

    2. If report is based on RDP class, check further following 2 things

    2a) If the range is based on a field, which is part of table of query of RDP >> add range in query.

    2b) If the range is not based on a field of query's table, add a contract class and add parm methods in contract class.

  • Community Member Profile Picture
    on at

    Thank you Sukrut.  It looks like I have to learn RDP class and get that working properly. Thanks!

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