Report

jsshivalik
Member Posts: 67
Hi
In a Database we have 2 companies. when i run the report i get Data from 1 Company . I want to get some Data in this particular report from Other Companies Item Ledger Entry table.
We can say i want to create a single report combining data from both Companies. I am using Navision 2013.
Thanks
In a Database we have 2 companies. when i run the report i get Data from 1 Company . I want to get some Data in this particular report from Other Companies Item Ledger Entry table.
We can say i want to create a single report combining data from both Companies. I am using Navision 2013.
Thanks
0
Answers
-
It is possible but requires a lot of coding.
Look at CHANGECOMPANY function on a rec variable - it enables yout to switch company on a record. But its scope is limited - it only changes company in the record var on which it is called. It means that you would need to change company on every single record var used on your report, and each time after a record var is cleared (CLEAR(RecVar)) or reset (RecVar.RESET);
You report structure needs to look like thisDataItem Company DataItem [Your header table] DataItem [Your details table]
And the in Company - OnAfterGetRecord:[Your header table].CHANGECOMPANY(Company.Name); [Your details table].CHANGECOMPANY(Company.Name); [Your global table var 1].CHANGECOMPANY(Company.Name); [Your global table var 2].CHANGECOMPANY(Company.Name); //...and so on
On the top of this in every single place in he report where you use a local rec var, or have a call to RESET/CLEAR on a local or global rec var you also need to add "your var".CHANGECOMPANY(Company.Name); statement
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-031 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions