Focal Point
BACKCOLOR OF HEADING IN PDF

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

April 06, 2006, 10:34 AM
chelsea
BACKCOLOR OF HEADING IN PDF
Hi,
how to control the backcolor of the report heading in a pdf report.i have a small heading and 10 columns and the backcolor of the heading is spanning till upto 10 columns and i dont want that. is there a way to control this from spanning till the last column.
thanks
April 06, 2006, 11:29 AM
Francis Mariani
This may do what you require, depeding on the complexity of the report heading:

TABLE FILE CAR
PRINT *
WHERE READLIMIT EQ 100
WHERE RECORDLIMIT EQ 100
HEADING
"THIS IS A TEST"
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=8, $
TYPE=HEADING, HEADALIGN=BODY, BACKCOLOR=RED, $
ENDSTYLE
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 06, 2006, 12:36 PM
chelsea
Hi Francis,
i am looking to control the backcolor of the heading in a pdf report and i tried ur code in pdf output and it did not work for me.
April 06, 2006, 12:55 PM
mgrackin
Chelsea,

I hate to say it but I have seen this problem and have not found a way to color the background of only a portion ("CELL") of a HEADING line when the output is PDF. I have only seen it color the background of the whole line as you are experiencing.

Sorry.

Mickey


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
April 07, 2006, 10:23 AM
Craig Kozlow
Mickey's right, this is a pain. However, you can do it with 2 passes using compound reports. It's not the most elegant way to do it, but it works!

SET PAGE=NOLEAD

TABLE FILE CAR
HEADING
"This is a Heading Line"
PRINT COUNTRY NOPRINT
IF RECORDLIMIT IS 1
ON TABLE PCHOLD FORMAT PDF OPEN NOBREAK
ON TABLE SET STYLE *
TYPE=REPORT,RIGHTMARGIN=6,$
TYPE=HEADING,LINE=1,BACKCOLOR=GRAY,$
END

TABLE FILE CAR
PRINT COUNTRY CAR MODEL
ON TABLE PCHOLD FORMAT PDF CLOSE
END

Lot's of ways to play around with the RIGHTMARGIN (making it more dynamic, etc.), as well as specifying the OPEN/CLOSE feature, but this works.

Craig Kozlow


PROD:WebFOCUS 7.6.11 on UNIX accessing FOCUS, Oracle, SQLServer
TEST: WebFOCUS 7.7.1 on UNIX accessing FOCUS, Oracle, SQLServer