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)

How to use temparary table in Axapta reports

(0) ShareShare
ReportReport
Posted on by 20

How to use temparary table in Axapta reports

*This post is locked for comments

I have the same question (0)
  • Steeve Gilbert Profile Picture
    1,501 on at

    Pretty much just like a non-temporary table except :

    1 - Temporary table cannot be the child (DataSource structure) of non-temp table.

    2 - Fill the table in init() after super() or in fetch() before super().

    Let us know if you have specific problem acheiving what you want.

  • Suggested answer
    Community Member Profile Picture
    on at

    If you're using the Query object of the report, you need to use the setRecord() method on the queryRun object, and pass in the temporary table that holds the data you need to run the report.  Have a look at this article on Axaptapedia, under the section of "Temporary tables in reports"

    http://www.axaptapedia.com/Temporary_tables

    That should point you in the right direction.  And as Steeve said, you use the temporary table just like a normal one.  Send the record like you would any other record buffer.

  • Community Member Profile Picture
    on at

    Hello,

    I have an addional question. I created a new report using a temporary table; basically we're summarizing the InventTrans table based on several criteria.

    It works smoothly in a development environment.

    I deployed the xpo in a test environment. The temp table loading goes well bu after assigning the temp table with setRecord(), the report's query only returns 6 rows (instead of the 50+ that actually are in the table).

    It is as if a filter somehow restricts the returned rows, but I dont see any "secret" range... and as I said, it works perfectly in the development environment.

    If anyone has an idea, I thank you in advance for your help!

    Eric

  • Luegisdorf Profile Picture
    1,930 on at

    Hi Eric

    Have you involved other tables in that query, and join restriction results in 6 rows? Make a little self test with "select count(Recid) from yourTable" before using setRecord(..)

    BTW: Here's some more tipps when using temporary tables in queries:axatluegisdorf.blogspot.com/.../join-queries-with-temporary-tables.html

  • Community Member Profile Picture
    on at

    Thanks for your reply. It is a single table report so the problem was not coming from a join.

    If it might help, I had grouping on three columns in the report data source. Somehow, in the dev environment, it didn't cause any problem. I removed the grouping (with a little bit of report re-arrangement) and this fixed my issue. I don't know whether it a temp table issue (table was created in dev but imported in test environment) or bad report design on my behalf.

    Regards,

    Eric

  • Community Member Profile Picture
    on at

    Hi, i fill tempdata after and before super method but report still show empty

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans