Focal Point
[SOLVED] How to remove space between subheads/subfoots in PDF ?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6091045013

December 15, 2008, 03:53 AM
Martin_fmi
[SOLVED] How to remove space between subheads/subfoots in PDF ?
Hi everybody,
I have encountered the following issue:
I have a report that has some data but I have to print the heading + subheads/subfoots based on some conditions. The problem is that I can't remove the blank space that is left in the report even when there is PRINT SOME_FIELD NOPRINT. One idea was to SUM on the some fields that correspond to the longest sequence of columns that are used but that works only if
all other subheads/subfoots are printed based on some of these columns ( those of the previous subfoot/subhead ). I've tryied SET EMPTYREPORT = ON|ANSI but this is not the case ... There is a post from mcgrakin where he suggests that setting TOPGAP = 0.000 and BOTTOMGAP = 0.000 and SIZE = 1 in report's data style but there are some tiny spaces left as well. So my question is whether there is way to achieve this without ANY spaces at all between the subheads and subfoots ? Thanks in advance.

This message has been edited. Last edited by: Martin_fmi,


WF 7.6.5 / OS: XP / FOCUS
December 15, 2008, 11:38 AM
Prarie
Try setting PRINTPLUS=ON and see if it helps.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Nope ... Frowner


WF 7.6.5 / OS: XP / FOCUS
See if this produces any ideas -here
Unless you do something wacky, I think your only option is the SIZE=1.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

Have you tried conditional subheads/subfoots?
  
TABLE FILE CAR
PRINT 
     COUNTRY
     CAR 
     MODEL
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT

ON CAR SUBHEAD
"Subhead <COUNTRY"
WHEN (COUNTRY EQ 'ENGLAND') AND
     (CAR EQ 'JENSEN');
ON CAR SUBFOOT
"Subfoot <COUNTRY"
WHEN (COUNTRY EQ 'ITALY') OR 
     (COUNTRY EQ 'FRANCE');
END 

-EXIT



WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
Exactly this causes the problem with spaces ... I've managed a workaround by multiplying the rows of the table by the number of subfoots and subheads treating them as column by somehow adjusting the corresponding positions which runs very slow though ...


WF 7.6.5 / OS: XP / FOCUS
If I read it correctly you only want heading subheads and subfoots

Here is a basic method as a starter

 
SET PAGE=NOLEAD
TABLE FILE CAR
"Heading"
SUM
COMPUTE DUMMY/A4='NULL'; AS '' 
BY COUNTRY NOPRINT
BY CAR NOPRINT
BY MODEL NOPRINT

ON CAR SUBHEAD
"Subhead <COUNTRY> "
WHEN (COUNTRY EQ 'ENGLAND') AND
     (CAR EQ 'JENSEN');
ON CAR SUBFOOT
"Subfoot <COUNTRY> "
WHEN (COUNTRY EQ 'ITALY') OR 
     (COUNTRY EQ 'FRANCE');
ON TABLE HOLD AS WP FORMAT WP NOCC
END 
-RUN
FILEDEF MAS DISK WP.MAS
-RUN
-WRITE MAS  FILENAME=WP      , SUFFIX=FIX     , $
-WRITE MAS  SEGMENT=WP, SEGTYPE=S0, $
-WRITE MAS  FIELDNAME=f1, USAGE=A2, ACTUAL=A02, $
-WRITE MAS  FIELDNAME=C1, USAGE=A8, ACTUAL=A08, $
-WRITE MAS  FIELDNAME=C2, USAGE=A12, ACTUAL=A12, $
-WRITE MAS  FIELDNAME=f2, USAGE=A1, ACTUAL=A56, $
TABLE FILE WP
PRINT C1  
      C2  
WHERE C1 OMITS 'NULL'
ON TABLE HOLD FORMAT ALPHA
END
-RUN
TABLE FILE HOLD 
PRINT C1 AS '' 
      C2 AS ''
ON TABLE PCHOLD FORMAT PDF
END


I thought about format WP but I didn't know how to make it work - great many thanks ! Thanks all as well for the support.


WF 7.6.5 / OS: XP / FOCUS
Most important thing is that the master that you create has the correct total length of columns.

By default FORMAT WP is an LRECL of 80.

If you are having any problems then stick ?FILEDEF after the HOLD FORMAT WP and you will
see what LRECL you actually have.