A report problem.

aliennav
Member Posts: 449
Hi all
I am designing a report.
I have declared 2 dataitems-->Customer and 2nd indented one i.e. contact(in which only person filter is applied)..Now, I am getting data like.>Customer body.
.
.
//////.
.
.
.All customer details
>>contact body>>>
.
.
.All contact details only of that customer.
NOW the problem is that i want this contact detail somewhere in between customer detail(where I have put ////).
Kindly suggest me how to achieve it.
Also,when I am trying to put source exp. in customer body which includes-->contact.name then I am gettin an error like this.----"The variable is not a record".
this is because system has not accessed the contact dataitem when working with cust. as it is the second dataitem.
Pl. suggest a solution.
I am designing a report.
I have declared 2 dataitems-->Customer and 2nd indented one i.e. contact(in which only person filter is applied)..Now, I am getting data like.>Customer body.
.
.
//////.
.
.
.All customer details
>>contact body>>>
.
.
.All contact details only of that customer.
NOW the problem is that i want this contact detail somewhere in between customer detail(where I have put ////).
Kindly suggest me how to achieve it.
Also,when I am trying to put source exp. in customer body which includes-->contact.name then I am gettin an error like this.----"The variable is not a record".
this is because system has not accessed the contact dataitem when working with cust. as it is the second dataitem.
Pl. suggest a solution.
0
Comments
-
Hi aliennav,
You can use Contact record variable to get the contact detail instead of using 2nd dataitem. Any reason of using 2nd dataitem?0 -
Hi Aliennav,
Your problem arises because there is not a direct link between customer and contact. You will need to add some code. Firstly declare a record variable for "Contact Business Relation" table 5054 and in the customer dataitem get the record for the customer. In the OnPreDataItem of the contact filter the contact on Company No. on the contact number found in the business relation e.g.if BusinessRelFound then Contact.setrange( "Company No.", ContBusRelRec."contact no." ) else currreport.skip;
where
BusinessRelFound is a boolean if Contact Business Relation record exists
ContBusRelRec is the record variable for Contact Business Relation0 -
Hey!
I found a different way of getting the desired format.
I have declared all the data in the group header instead of body of customer.
Then I have declared some data in the contact body.
Then the rest of the data in the customer group footer.
Thanx for ur help.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