I have a list page for which the source table is temporary. I can see on screen that there are plenty of records displayed. However, when I try and run a report from it, as below
report.RunModal(Report::CustomTrialBalanceByDim, false, false, Rec);
I get:
The report couldn’t be generated, because it was empty. Adjust your filters and try again.
Rec.Count contains a value of over a thousand, so there is data to process.
Is it because the table is temporary? If yes, what do I have to do differently? I've done this a bunch of times using permanent tables.
Thanks all for your help. I got there in the end. Here's a quick summary of what I did:-
In the Report object:
1. Define a global var of the temporary Record type.
2. Define a public procedure (e.g.) FillTempRecordSet, that takes in a parameter of temporary Record type and feeds the data from the passed-in Record object to the global object. (Uses Record.TransferFields)
3. Define an OnAfterGetRecord trigger to iterate through the recordset
4. Each column should be using the global record var (e.g.) column(No; TempRec."No.") { }
In the trigger OnAction() of the calling Page object:
1. Define a Report object var
2. Call the public procedure (e.g.) ReportObject.FillTempRecordSet and pass in Rec
3. Call ReportObject.RunModal
Hi,
Pls create replica of this data when you open the page. And from that replica table, create report and run.
Regards
Amit Sharma
www.erpconsultors.com
Hi,
Yes, if the Table is set to temporary by any reason so in that case you can see the data only when you open the page, if you will try to create a Report with the table, in that case report will not show you anything or give error.
Better to check how data is transferring to Temp Table, and try to create one more Replica of of this Temp Table, and transfer data into your new table and then design your report with this new table.
After you show your data in report, just delete all data from new table, not to make any duplicate data.
Thanks.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,807 Super User 2024 Season 2
Martin Dráb 229,135 Most Valuable Professional
nmaenpaa 101,156