Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How to color background in SUBFOOT, including RIGHTGAP?
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] How to color background in SUBFOOT, including RIGHTGAP?
 Login/Join
 
Member
posted
We are trying to create light blue background for different column sections.
For example, the first section contains two colunms with a light blue background, the 2nd section contains two columns with a white background, and the 3rd section contains two columns with a light blue background.

It works well with the detail:
TYPE=DATA, COLUMN=CATEGORY, BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=PRODUCT, BACKCOLOR=RGB(234 234 255), $

When we try to apply it to the SUBFOOT, the RIGHTGAP remains white.
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=TEXT, ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N2,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N3,$

I have an example that runs on GGSALES that I can send you if you request it ... it is too long to post here.

This message has been edited. Last edited by: Kerry,


Judy Miller
Software Engr, Decision Support
Prism Group, Inc.
Email: judy@prism-grp.com

WebFOCUS 7.6.9
Windows XP
Output: PDF, Excel, COMT

 
Posts: 18 | Location: Colorado Springs, CO | Registered: January 23, 2008Reply With QuoteReport This Post
Member
posted Hide Post
Excuse the typos ... the 2nd section has a white background, whereas the 1st and 3rd sections have a light blue background.

I am devloping on WebFCOUS 6.4.9


Judy Miller
Software Engr, Decision Support
Prism Group, Inc.
Email: judy@prism-grp.com

WebFOCUS 7.6.9
Windows XP
Output: PDF, Excel, COMT

 
Posts: 18 | Location: Colorado Springs, CO | Registered: January 23, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Judy,

A couple of thoughts:

1) Please correct the WebFOCUS version number in your signature. WF 6.4.2 never existed.

2) If the color for the SUBFOOT is the same for all columns, try using a style statement for the SUBFOOT line without specifying specific columns.

TYPE=SUBFOOT, BACKCOLOR=RGB(234 234 255),$


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Member
posted Hide Post
Is my signature different than my Profile? I have WF 7.6.9 in my profile ... I don't know where the signature came from. Sorry, I don't use this very often.


Judy Miller
Software Engr, Decision Support
Prism Group, Inc.
Email: judy@prism-grp.com

WebFOCUS 7.6.9
Windows XP
Output: PDF, Excel, COMT

 
Posts: 18 | Location: Colorado Springs, CO | Registered: January 23, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Your signature is an item in your profile.

Antoher question, What is your output format, HTML or PDF?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Member
posted Hide Post
My coworker suggested I go ahead and submit the code so you could run it and see. I'm trying the shade sections 1 and 3 and leave section 2 white. I am on WF 7.6.9.

  
-* File rightgap.fex
DEFINE FILE GGSALES
   D_DUMMY/A1 = '';
END
TABLE FILE GGSALES
SUM COMPUTE FMT_UNITS/D12     = UNITS;           AS 'Units'
 COMPUTE DAY_AVG/D12       = UNITS / 7;       AS 'Day Avg'
 COMPUTE FMT_DOLLARS/D12:D = DOLLARS;         AS 'Sales'
 COMPUTE AVG_PRICE/D6.2:D  = DOLLARS / UNITS; AS 'Avg Price'
BY D_DUMMY  NOPRINT
BY CATEGORY
BY PRODUCT
-* Subtotal
ON CATEGORY UNDER-LINE
ON CATEGORY RECAP
   ST_AVG_PRICE/D6.2:D = DOLLARS / UNITS;
ON CATEGORY SUBFOOT
"Subtotal:<D_DUMMY<ST.FMT_UNITS<ST.DAY_AVG<ST.FMT_DOLLARS<ST_AVG_PRICE"
-* Grand Total
ON D_DUMMY RECAP
   GT_AVG_PRICE/D6.2:D = DOLLARS / UNITS;
ON D_DUMMY SUBFOOT
"</1>Total:<D_DUMMY<ST.FMT_UNITS<ST.DAY_AVG<ST.FMT_DOLLARS<GT_AVG_PRICE"
-* Heading
HEADING
"Section 1<+0>Section 2<+0>Section 3"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
-* style sheet
UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, $
TYPE=REPORT, HEADALIGN=BODY, LEFTGAP=0.1, FONT='ARIAL', SIZE=7, GRID=OFF, $
TYPE=UNDERLINE, COLOR='LIGHT GREY',$
TYPE=TITLE, COLOR='WHITE',BACKCOLOR=RGB(0 0 139), JUSTIFY=RIGHT, STYLE=-UNDERLINE+BOLD, $
TYPE=HEADING, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBHEAD, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBFOOT, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBTOTAL, STYLE=BOLD, $
-* Three sections
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, POSITION=0.4, COLOR='WHITE', BACKCOLOR=RGB(0 0 139),$
TYPE=HEADING, LINE=1, ITEM=2, OBJECT=TEXT, POSITION=1.9, COLOR='WHITE', BACKCOLOR=RGB(0 0 139),$
TYPE=HEADING, LINE=1, ITEM=3, OBJECT=TEXT, POSITION=3.2, COLOR='WHITE', BACKCOLOR=RGB(0 0 139),$
-* column titles
TYPE=TITLE, COLUMN=N2, JUSTIFY=LEFT, STYLE =-UNDERLINE,$
TYPE=TITLE, COLUMN=N3, JUSTIFY=LEFT, STYLE =-UNDERLINE,$
-* Shade Section 1 and Section 3 light blue
TYPE=DATA, COLUMN=CATEGORY,    BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=PRODUCT,     BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=FMT_DOLLARS, BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=AVG_PRICE,   BACKCOLOR=RGB(234 234 255), $
-* Subtotal
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=TEXT,  ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N2,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N3,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=2, POSITION=N4,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=3, POSITION=N5,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=4, BACKCOLOR=RGB(234 234 255), POSITION=N6,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=5, BACKCOLOR=RGB(234 234 255), POSITION=N7,$
-* Grand Total
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=TEXT,  ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N2,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N3,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=2, POSITION=N4,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=3, POSITION=N5,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=4, BACKCOLOR=RGB(234 234 255), POSITION=N6,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=5, BACKCOLOR=RGB(234 234 255), POSITION=N7,$
ENDSTYLE
END

 
Posts: 18 | Location: Colorado Springs, CO | Registered: January 23, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
You cannot specify a piece of the background colour in a subfoot line - it has to be the whole SUBFOOT line. However, you CAN colour an individual object on an individual line of a SUBFOOT. And you CAN color individual lines of a SUBFOOT.

I think this is a deficiency of WebFOCUS styling.

-* File rightgap.fex
DEFINE FILE GGSALES
   D_DUMMY/A1 = '';
END
TABLE FILE GGSALES
SUM COMPUTE FMT_UNITS/D12     = UNITS;           AS 'Units'
 COMPUTE DAY_AVG/D12       = UNITS / 7;       AS 'Day Avg'
 COMPUTE FMT_DOLLARS/D12:D = DOLLARS;         AS 'Sales'
 COMPUTE AVG_PRICE/D6.2:D  = DOLLARS / UNITS; AS 'Avg Price'
BY D_DUMMY  NOPRINT
BY CATEGORY
BY PRODUCT
-* Subtotal
ON CATEGORY UNDER-LINE
ON CATEGORY RECAP
   ST_AVG_PRICE/D6.2:D = DOLLARS / UNITS;
ON CATEGORY SUBFOOT
"Subtotal:<D_DUMMY<ST.FMT_UNITS<ST.DAY_AVG<ST.FMT_DOLLARS<ST_AVG_PRICE"
"Subtotal line 2 <40 Another piece"
-* Grand Total
ON D_DUMMY RECAP
   GT_AVG_PRICE/D6.2:D = DOLLARS / UNITS;
ON D_DUMMY SUBFOOT
"</1>Total:<D_DUMMY<ST.FMT_UNITS<ST.DAY_AVG<ST.FMT_DOLLARS<GT_AVG_PRICE"
-* Heading
HEADING
"Section 1<+0>Section 2<+0>Section 3"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
-* style sheet
UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, $
TYPE=REPORT, LEFTGAP=0.1, FONT='ARIAL', SIZE=7, GRID=OFF, $
TYPE=UNDERLINE, COLOR='LIGHT GREY',$
TYPE=TITLE, COLOR='WHITE',BACKCOLOR=RGB(0 0 139), JUSTIFY=RIGHT, STYLE=-UNDERLINE+BOLD, $
TYPE=HEADING, STYLE=BOLD, $
TYPE=SUBHEAD, STYLE=BOLD, $
TYPE=SUBFOOT, STYLE=BOLD, $
TYPE=SUBTOTAL, STYLE=BOLD, $
-* Three sections
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, POSITION=0.4, COLOR='WHITE', BACKCOLOR=RGB(0 0 139),$
TYPE=HEADING, LINE=1, ITEM=2, OBJECT=TEXT, POSITION=1.9, COLOR='WHITE', BACKCOLOR=RGB(0 0 139),$
TYPE=HEADING, LINE=1, ITEM=3, OBJECT=TEXT, POSITION=3.2, COLOR='WHITE', BACKCOLOR=RGB(0 0 139),$
-* column titles
TYPE=TITLE, COLUMN=N2, JUSTIFY=LEFT, STYLE =-UNDERLINE,$
TYPE=TITLE, COLUMN=N3, JUSTIFY=LEFT, STYLE =-UNDERLINE,$
-* Shade Section 1 and Section 3 light blue
TYPE=DATA, COLUMN=CATEGORY,    BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=PRODUCT,     BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=FMT_DOLLARS, BACKCOLOR=RGB(234 234 255), $
TYPE=DATA, COLUMN=AVG_PRICE,   BACKCOLOR=RGB(234 234 255), $
-* Subtotal
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=TEXT,  ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N2,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=1, POSITION=N3,$
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=2, POSITION=N4,COLOR=RED, $
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=3, POSITION=N5,COLOR=BLUE, $
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=4, POSITION=N6, $
TYPE=SUBFOOT, BY=CATEGORY, OBJECT=FIELD, ITEM=5, POSITION=N7, $
TYPE=SUBFOOT, LINE=2, ITEM=1, BACKCOLOR=GREEN, COLOR=PURPLE, $
TYPE=SUBFOOT, LINE=2, ITEM=2, BACKCOLOR=ORANGE, COLOR=WHITE, $
-* Grand Total
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=TEXT,  ITEM=1, BACKCOLOR=RGB(234 234 255), POSITION=N2,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=1, POSITION=N3,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=2, POSITION=N4,COLOR=ORANGE, $
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=3, POSITION=N5,COLOR=GREEN, $
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=4, POSITION=N6,$
TYPE=SUBFOOT, BY=D_DUMMY, OBJECT=FIELD, ITEM=5, POSITION=N7,$
ENDSTYLE
END


(By the way, if the report is PDF only, then HEADALIGN will not do anything, and HEADALIGN is not valid for TYPE=REPORT.

Cheers,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Judy,

Here's a fix for the issue:

TYPE=HEADING, LINE=1, ITEM=3, OBJECT=TEXT, POSITION=3.2, COLOR='WHITE', BACKCOLOR=RGB(0 0 139), WIDTH=0.94,$

As for your signature, EDIT your profile and look for the SIGNATURE portion of your profile.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Judy,

I also wrote a couple of articles on HTML and PDF Output Formats that you may find useful which are posted on Focal Point.

Go to this link, scroll to the bottom and look for WebFOCUS HTML and PDF Report Design PartI and Part II.

http://www.informationbuilders...evelopers/index.html


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Mickey, adding the WIDTH tag makes it work? I did not know that! Thanks for the tip.

Cheers,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Judy, Francis;

I have noticed that the GAPs really only seem to affect the DATA columns in the report. HEADINGs, FOOTINGs, SUBHEADs, etc. seem to be a bit flaky when it comes to GAPs. That's why when you start positioning HEADING items over columns you really need to take complete control over the process and position everything and set the WIDTHs of each component. That way nothing is left to chance or default. As the old saying goes: DEFAULT and DISASTER both start with 'D'.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How to color background in SUBFOOT, including RIGHTGAP?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.