Hello developers,
How to get data from multiple companies in report? NAV2009R2/ Classic report
I need to show customer and vendor entries per company in report. Is there any solution?
Yes, with CHANGECOMPANY function it's possible to access to data from other companies.
Create a data item on Company table and into the OnAfterGetRecord trigger use this function on every record variable that's been used.
What I found is that you have to put the CHANGECOMPANY function on the "OnPreDataItem() " trigger of the records in your report. Also make sure the tables you are using are indented after the Company DataItem so that the report can loop through all companies.
Comments
Create a data item on Company table and into the OnAfterGetRecord trigger use this function on every record variable that's been used.
I`ll try it.
What I found is that you have to put the CHANGECOMPANY function on the "OnPreDataItem() " trigger of the records in your report. Also make sure the tables you are using are indented after the Company DataItem so that the report can loop through all companies.