Give us feedback
Register your copy of Developer Studio
Developer Studio Workshop

Removing the Blank Line Between Title and Data in PDF Reports
By Kasi Krishan

Have you ever noticed that there is a blank line between the report title and the first line of data? Have you ever wanted to remove it?

For example, when you execute the following code:

TABLE FILE CAR
PRINT
COUNTRY
CAR
HEADING CENTER
"CAR REPORT"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT PDF
END
You get the following PDF report:

You can see there is a blank line between the column titles and first row of the data section. Actually, this is not a blank line, it is a space left over from the underlining of titles. (Thanks to Pietro De Santis.)

There are two options to remove this blank line.

Option 1: Remove the underline. (Thanks to Mickey.)

The space can be removed by eliminating the underline in the titles as follows (you can see the stylesheet section has been added):

TABLE FILE CAR
PRINT
COUNTRY
CAR
ON TABLE HEADING CENTER
"Car Report"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=TITLE, BORDER=LIGHT,BORDER-COLOR=WHITE,STYLE=BOLD,$
ENDSTYLE
END

The report output will look as follows:

Option 2: Move the heading to PageHeading. (Thanks to Piipster.)

Switch off the titles using AS ' ' and move the titles to the heading part as follows:

TABLE FILE CAR
PRINT
COUNTRY AS ' '
CAR AS ' '
MODEL AS ' '
SEAT AS ' '
BODYTYPE AS ' '
ON TABLE HEADING CENTER
"Car Report"
" "
"COUNTRY <+0>CAR <+0>MODEL <+0>SEAT <+0>BODYTYPE"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=1, POSITION='N1',$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=2, POSITION='N2',$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=3, POSITION='N3',$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=4, POSITION='N4',$
TYPE=HEADING, LINE=3, OBJECT=TEXT, ITEM=5, POSITION='N5',$
ENDSTYLE
END
The report output will look as follows:

For more information regarding this topic, visit http://forums.informationbuilders.com/groupee/forums/.