Focal Point
Unwanted line spacing in a PDF

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

August 22, 2008, 11:16 AM
SH
Unwanted line spacing in a PDF
Hello,

I have been looking for a solution of the problem that is described by the following piece of code:
TABLE FILE CAR
BY CAR NOPRINT

ON CAR SUBHEAD
"<CAR "     
ON CAR SUBFOOT
"<SEATS "
"<MODEL "
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=ON,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END


What I want is the possibility not to have a DATA row in a generated report, but generate SUBFOOTs and SUBHEADINGs where necessary.

When outputing the report into PDF there is a line spacing between the SUBHEAD and the SUBFOOT, which seems as a blank line and is not reflected by the font size (i.e. the blank line's height is the same whether I use font size 10 or 30).

I have tried various ways to remove this blank and non of the attributes have come in handy

I know that the requirement not to have a print statement is a bit awkward, but in certain situations I just need this functionality and this blank line is my only show-stopper. I would be grateful if someone could give me some tips on how to deal with this... even if it is a workaround.

Thanks!


WebFOCUS 7.6, Windows XP, Output: HTML, PDF
August 22, 2008, 12:28 PM
Darin Lee
since the sort value is the same, why don't you just put both of them in the subhead? If there is no data to print, it won't make any difference.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
August 26, 2008, 03:18 AM
SH
quote:
Originally posted by Darin Lee:
since the sort value is the same, why don't you just put both of them in the subhead? If there is no data to print, it won't make any difference.


Hi,

Thanks for the suggestion, but even if I put everything in the subhead, there will be unneeded space between the subhead and the non-existing/invisible subfoot. Please check the sample with everything in the subhead.

So, this is not a resolution of my problem.

If anyone has other ideas, please share them with me!


WebFOCUS 7.6, Windows XP, Output: HTML, PDF
August 26, 2008, 11:21 AM
Darin Lee
Not quite sure where you're going with this. How can there be space between a subhead and a non-existing footing?

This code yields the following result:
TABLE FILE CAR
BY CAR NOPRINT
ON CAR SUBHEAD
"<CAR "     
"<SEATS "
"<MODEL "
ON TABLE SET PAGE-NUM OFF 
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END

ALFA ROMEO
8
2000 SPIDER VELOCE

AUDI
5
100 LS 2 DOOR AUTO

BMW
29
530I 4 DOOR AUTO

DATSUN
4
B210 2 DOOR AUTO

JAGUAR
7
XJ12L AUTO

JENSEN
4
INTERCEPTOR III

MASERATI
2
DORA 2 DOOR

PEUGEOT
5
504 4 DOOR

TOYOTA
4
COROLLA 4 DOOR DIX AUTO

TRIUMPH
2
TR7

What is it exactly that isn't what you want? The line in between the records? If so, that won't go away because space is reserved for your verb objects (fields) but you have them all NOPRINTed. However, don't build yourself such a small box. There are many ways to make things appear the way you want them. The output of the following code appears identical but without a blank space between records, even though the approach is completely different.
TABLE FILE CAR
PRINT CAR AS '' OVER
SEATS AS '' OVER
MODEL
BY CAR NOPRINT
ON TABLE SET PAGE-NUM OFF 
ON TABLE SET HTMLCSS ON
ON TABLE SET ONLINE-FMT PDF
ON TABLE NOTOTAL
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=ON,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=DATA, JUSTIFY=LEFT,$
ENDSTYLE
END

Back up and look at the requirement, without restricting or assuming the methods used to get there.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
August 26, 2008, 11:44 AM
mgrackin
If you are not showing any data values at all in the DATA row then it seems that you cannot control the row. You need to show at least one data field and then place an AS '' to hide the column title. Then use stylesheet syntax to shrink the data row and change the text color and the background color to the same value.

Here's an example:

TABLE FILE CAR
BY CAR AS ''
ON CAR SUBHEAD
"<CAR "
"<SEATS "
"<MODEL "
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA,
TOPGAP=0.000, BOTTOMGAP=0.000,
BACKCOLOR=WHITE, COLOR=WHITE, SIZE=1,$
ENDSTYLE
END


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
August 27, 2008, 03:37 AM
SH
Hi Mickey,

This piece of code shows exactly what I wanted visually. I.e. if the report was going to be just printed then everything could be done in the way you suggest.

However, if you copy/paste the text from the PDF - then the hidden text would be there, which is bad.

I was really looking forward to be able to control the data stylesheet, without the need to actually have any data, but as you mentioned - this seems not to be the case.

I will have your workaround in mind as it seems the best solution so far. Thanks!


WebFOCUS 7.6, Windows XP, Output: HTML, PDF