Suppress report pages

harm.poelen
Member Posts: 36
Hi there,
I have a problem with a report that should be used as a reminder to the suppliers for items not yet delivered. This report has three data items (vendor with page break, purchase header and purchase line). The problem is that the report always prints the pages for the vendor... even if there a no purchase lines or purchase headers for that vendor.
I tried to use the following code to suppress the output if there are no entry lines for that supplier that still need to be delivered.
Lines.SETCURRENTKEY("Document Type","Pay-to Vendor No.","Currency Code");
Lines.SETRANGE("Document Type", Lines."Document Type"::Order);
Lines.SETRANGE("Buy-from Vendor No.", Vendor."No.");
Lines.SETRANGE("Outstanding Quantity", 0, 9999999);
Lines.SETRANGE(Type, Lines.Type::Item);
IF NOT Lines.FIND() THEN BEGIN
MESSAGE('Geen records gevonden');
CurrReport.SKIP;
END
I also used the SHOWOUTPUT part of the section code but that only made the output invisible... it did not suppress the page for that vendor without purchase lines. Any suggestions on how to setup the report so that only the records will be shown for suppliers that have purchase lines that meet the criteria.
I have a problem with a report that should be used as a reminder to the suppliers for items not yet delivered. This report has three data items (vendor with page break, purchase header and purchase line). The problem is that the report always prints the pages for the vendor... even if there a no purchase lines or purchase headers for that vendor.
I tried to use the following code to suppress the output if there are no entry lines for that supplier that still need to be delivered.
Lines.SETCURRENTKEY("Document Type","Pay-to Vendor No.","Currency Code");
Lines.SETRANGE("Document Type", Lines."Document Type"::Order);
Lines.SETRANGE("Buy-from Vendor No.", Vendor."No.");
Lines.SETRANGE("Outstanding Quantity", 0, 9999999);
Lines.SETRANGE(Type, Lines.Type::Item);
IF NOT Lines.FIND() THEN BEGIN
MESSAGE('Geen records gevonden');
CurrReport.SKIP;
END
I also used the SHOWOUTPUT part of the section code but that only made the output invisible... it did not suppress the page for that vendor without purchase lines. Any suggestions on how to setup the report so that only the records will be shown for suppliers that have purchase lines that meet the criteria.
CANE Microsoft Solutions BV
Prins Hendrikplein 14
2518 JC DEN HAAG
The Netherlands
http://www.cane.nl
Prins Hendrikplein 14
2518 JC DEN HAAG
The Netherlands
http://www.cane.nl
0
Comments
-
-
0
-
Ok, Ok, I used my memory instead Navision, it was faster but not exact... :-)0
-
I must regret to say that this solution did not work.
It works fine for suppliers where there is no purchase order at all. If there are purchase orders the header is always shown... Because I use the following statement in the OnPreSection statement...
CurrReport.SHOWOUTPUT(("Purchase Line"."Outstanding Quantity" > 0) AND ("Purchase Line".Type = "Purchase Line".Type::Item));
this influence the behavior and shows a header for those suppliers where no outstanding purchase lines are linked. It's too bad that you are not in a possition to use complex SQL statements with inner joins... that would fix this issue very easy... But I can not believe that there is not no solution for this problem... Any additional suggestions?CANE Microsoft Solutions BV
Prins Hendrikplein 14
2518 JC DEN HAAG
The Netherlands
http://www.cane.nl0 -
You must set same property for the header... if the header will be not showen, the vendor will be not showen too...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