run report for multiple companies

darmaadarmaa Member Posts: 65
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?

Comments

  • geordiegeordie Member Posts: 655
    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.
  • darmaadarmaa Member Posts: 65
    Thanks geordie,
    I`ll try it.
  • Ephraim_07Ephraim_07 Member Posts: 9
    This solutions is almost correct.

    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.
Sign In or Register to comment.