Getting Data from two companies in a report

renjita
Member Posts: 40
Hi,
I want to get data from two companies for report Generation.So is their any way we can do it ?
Please suggest ?
Regards
Renjita
I want to get data from two companies for report Generation.So is their any way we can do it ?
Please suggest ?
Regards
Renjita
0
Comments
-
Hi,
Try CHANGECOMPANY function. this function is used to redirect references to table data from one company to another.
Example
This example shows how to use the CHANGECOMPANY function.
"G/L Account".CHANGECOMPANY('New Company');
"G/L Account".GET('1000');
"G/L Account".CALCFIELDS(Balance);// Calculates the balance
// for account no. 1000 in
// 'New Company'
"G/L Entry".CHANGECOMPANY('New Company');
"G/L Entry".SETCURRENTKEY("No.",LedgerEntry.Date);
"G/L Entry".SETRANGE("No.",'1000');
"G/L Entry".SETRANGE(Date,010196D,013196D);
"G/L Entry".CALCSUMS(NetAmount); // Sums NetAmount from
// all G/L entries on
// account no. 1000 within
// the specified range,
// for 'New Company'
"G/L Entry".RESET;
"G/L Entry".FIND('+'); // Finds the largest "No."
// in the G/L Entry table in
// 'New Company'
"G/L Entry".DELETE; // Deletes this entry in
// 'New Company'
This example shows that once the CHANGECOMPANY function has been called, all future references to the G/L Account and G/L Entry tables will refer to the table data in New Company.0 -
hi,
Do we have to use Table directly or can we use record variable of the table instead ?
like using record Variable RecG/LAccount of G/L Entry Table
RecG/LAccount.CHANGECOMPANY('New Company');
RecG/LAccount.GET('1000');
RecG/LAccount.CALCFIELDS(Balance);// Calculates the balance
Regards
Renjita0 -
Sure you can, you can use record variable0
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