Notifications
Announcements
No record found.
How to use temparary table in Axapta reports
*This post is locked for comments
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.
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.
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
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
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,
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Priya_K 4
Martin Dráb 4 Most Valuable Professional
MyDynamicsNAV 2