Report Generation
sridhar
Member Posts: 171
I have an exercise where in I have to view all the customers placed an sales order.
I have used two tables, Customer and Sales Header(Intended).
I have set the DataItemLink ("Sell-to Customer No." of Sales Header and "No." of Customer Table).
But I m getting the list of all the customer. I want to see only the Customers who were placed the sales orders.
what I have to do?
I have used two tables, Customer and Sales Header(Intended).
I have set the DataItemLink ("Sell-to Customer No." of Sales Header and "No." of Customer Table).
But I m getting the list of all the customer. I want to see only the Customers who were placed the sales orders.
what I have to do?
0
Comments
-
In your second Dataitem, set the property PrintOnlyIfDetail to true.$cside -MBS
>install Navision::4.0 SP1
>q
$
oOo0 -
Thanks,
I tried it, even then I am not getting the exact result.
N.Sridhar0 -
In that case, l think we have to do some bit of coding...l cannot think of another solution at the moment. So it goes like so.
Get rid og the second dataitem and declare a record VAR of subtype SAles Header(SHeader), and onaftergetrecord of the first item, setfilter(No.,Sell-to-Cust). Now check, if Sheader.COUNT = 0, then currreport.skip.
That must give you Customers that hav placed orders.
I hope l am getting your requirement clearly.$cside -MBS
>install Navision::4.0 SP1
>q
$
oOo0 -
Hi Sridhar,
you can do it with setting PrintOnlyIfDetail to true, but you have to set it in the first dataitem. This should do the work.
Regards,
Frank0 -
Just switch the order of your tables, so that Sales Invoice header is the first table and Customer is the second, This way it goes through all Sales invoice headers and pulls the appropriate customer info.
your method is going through all customers and seeing if there is a sales invoice header.0 -
Thanks, was exactly what i was looking for :-)!!!!0
-
what if u do something like this:
Have 1 DataItem (Customer)
Create a Variable SHeader (Sales Header)
OnAfterGetRecord of Customer DataItem add the following:
SHeader.Reset;
SHeader.Setrange("Sell-To-Customer No.",Customer."No.");
if not SHeader.find('-') Then CurrReport.Skip
Sunday, Godwin G0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions