April 06, 2006, 10:34 AM
chelseaBACKCOLOR 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 MarianiThis 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
chelseaHi 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
mgrackinChelsea,
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
April 07, 2006, 10:23 AM
Craig KozlowMickey'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