Suppress Blank lines in report

whyaskqcn
Member Posts: 22
I have created several footer bands, each band with different condictions for CurrReport.SHOWOUTPUT(). HOwever, I noted that blank lines are printed if the condition is false. Is there anyway I can suppress printing the blank lines?
Thanks for advice.
Thanks for advice.
0
Comments
-
Have you the condition in OnPreSection or in OnPostSection?0
-
in the data item properties is the PrintOnlyIfDetail set to Yes?
i'm not sure if that will help with the footers but worth a shot - unless someone knows for sure?0 -
Hi, both. Thanks for the suggestions. Just sharing the results I have obtained.
the condition was set on the OnPreSection. Have tried with OnPostSection. No difference.
PrintOnlyDetails - if set to Yes, at Sales Line, nothing gets printed at all even though there are details. When set at Sales Header, the document prints fine. However, the footer concerned still have a big gap -- due to the number of lines in the footer band.0 -
I recall somewhere that Navision always leaves space for a section, whether it actually prints the text or not. A solution I know of involves creating a dataitem for each section (or at least a dataitem that covers all the footers, in your case).
So, suppose your report has a Customer dataitem, with the following footer sections:Customer - Footer 1 CurrReport.SHOWOUTPUT(Condition1); Customer - Footer 2 CurrReport.SHOWOUTPUT(Condition2); Customer - Footer 3 CurrReport.SHOWOUTPUT(Condition3);
My solution is to create three new Integer dataitems, with DataItemTableView set to SORTING(Number) WHERE(Number=CONST(1)).Customer CF1 - Integer CF2 - Integer CF3 - Integer
Note that the sections are not indented under Customer, so they will be triggered only after all the Customer records have been processed.
Now in CF1 (and similarly for CF2, CF3) put the codeIF NOT Condition1 THEN CurrReport.SKIP;
(you might have to use BREAK instead of SKIP).
There is a second alternative. It is not so useful if the footers have lots of controls, but suppose they just contain a label "This is Footer 1", "This is Footer 2", "This is Footer 3". Then the three footers could be replaced by a single footer with a textbox (instead of label) with SourceExpr = MyFooterTxt; you would then have the following code:
[code]
CASE TRUE OF
Condition1: MyFooterTxt:= "This is Footer 1";
Condition2: MyFooterTxt:= "This is Footer 2";
Condition3: MyFooterTxt:= "This is Footer 3";
END;
[\code]
I hope this is clear enough.
AlastairAlastair Farrugia0
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
- 322 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