Focal Point
How to change the background color for a heading line?

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

July 12, 2004, 05:40 AM
<kj>
How to change the background color for a heading line?
Is there a way to change the background colour of a specific heading line. Here is a simple example.

SET STYLE = OFF
SET STYLEMODE=FIXED
TABLE FILE CAR
HEADING
"<25>Country:<|COUNTRY"
"<25>Model:<|MODEL"
"<50>Sales: "
PRINT COUNTRY NOPRINT
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,$
TYPE=HEADING,LINE=2,BACKCOLOR=RED,$
ENDSTYLE
END

I want to change heading line 2 background colour as red.
I tried with
type = heading,
line=2,
backcolor=red
It works fine if the line has static text. If the line is displaying any data from database, it doesn't work. Is there a workaround for this?
(I intentionally put | after < and before field name. other wise the forum is ignoring to display the field name in the post.)

Thanks,
kj
July 12, 2004, 08:39 AM
<Grzegorz>
Strange, but it looks like adding a leading space to the HEADING line should solve the problem:

SET STYLE = OFF
SET STYLEMODE=FIXED
TABLE FILE CAR
HEADING
"<25>Country:<|COUNTRY"
" <25>Model:<|MODEL"
"<50>Sales: "
PRINT COUNTRY NOPRINT
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,$
TYPE=HEADING,LINE=2,BACKCOLOR=RED,$
ENDSTYLE
END

You can also use POSITION attribute of the HEADING stylesheet to precisely align heading items.

Conclusion: Never place a spot marker at the beginning of a heading line.

Hope this helps
Grzegorz
July 12, 2004, 01:53 PM
<kj>
Thanks Grzegorz. It worked.

Thanks,
kj