Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Blank Lines & Colours on Subtotal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Blank Lines & Colours on Subtotal
 Login/Join
 
Gold member
posted
I have a requirement where in i need to show up report in colours on the change of sort value of the Subtotal.For eg..
------------------------------------------------
COL1 COL2 COL3

TOTAL ENGLAND
COL1 COL2 COL3

TOTAL JAPAN
TOTAL
------------------------------------------------
all the values for the sort value england should come up in brown including the data and the subtotals
similarly all the values for the sort value japan should come up in some other colour.
Please let me know how this can be done coz i am not able to achieve this functionality through conditional styling.

I also get blank lines on my subtotal and total can any one help me regarding this as previous posts regarding this didn't help much to me.

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


7.6.4
Unix & Windows
Excel,HTML,PDF,PPT,AHTML


 
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008Report This Post
Expert
posted Hide Post
TYPE=DATA,
     BACKCOLOR=( BY=B1 'SILVER' 'FUCHSIA' ),
$


This doesn't do subtotals and you can do up to 4 colors but it might be a start for you.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
From what you describe, there shouldn't be a reason why conditional styling would not work. Must be missing something.

Here's an example:
-* File car.fex
TABLE FILE CAR
PRINT 
     CAR
     DEALER_COST
BY COUNTRY
ON COUNTRY SUBTOTAL AS '*TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=N1 EQ 'ENGLAND',
$
     DEFMACRO=COND0002,
     MACTYPE=RULE,
     WHEN=N1 EQ 'JAPAN',
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=DATA,
     COLUMN=N2,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N2,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=SUBTOTAL,
     BY=1,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=SUBTOTAL,
     BY=1,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
ENDSTYLE
END


Not quite sure what you mean by the blank lines on your subtotal and totals. (unless you're talking about the split-line phenomenon where it says TOTAL on one line and has the values on the next. This is caused by having insufficient width on the first column to display the subtotal heading and has been addressed many times on the forum.)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
Thanks Darin for the code,
but my report can have n number of sort values and how do we deal with it.
for a change in the sort values the colours should be alternating

And on the lines, yes i was talking abt the split line phenomena only please see the code below and its giving multi lines for total and subtotal


quote:
-DEFAULT &RPTFORMAT='EXL2K';
-DEFAULT &SORT_BY='CAR';
-SET &SORT = IF &SORT_BY EQ 'COUNTRY' THEN 'BY COUNTRY' ELSE 'BY CAR';
DEFINE FILE CAR
HLEVEL/A800 WITH COUNTRY = 'A';
END
TABLE FILE CAR
PRINT
CAR
COUNTRY
MODEL
DCOST
RCOST
SALES
COMPUTE PER_SALES/D20CB=(100*(DCOST/RCOST));
BY HLEVEL NOPRINT
BY COUNTRY NOPRINT
ON COUNTRY RECOMPUTE AS ''
ON TABLE RECOMPUTE AS 'Total'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET SQUEEZE ON
ON TABLE SET BYDISPLAY ON
ON TABLE SET ONLINE-FMT &RPTFORMAT
ON TABLE SET WEBVIEWER ON
ON TABLE SET WEBVIEWTARG OFF
ON TABLE SET STYLE *
TYPE=SUBFOOT, HEADALIGN=BODY, STYLE=BOLD, JUSTIFY=RIGHT, $
-*$
TYPE=DATA,
BACKCOLOR=( BY=B1 'SILVER' 'WHITE' ),
$
ENDSTYLE
END

quote:
Re


7.6.4
Unix & Windows
Excel,HTML,PDF,PPT,AHTML


 
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008Report This Post
Virtuoso
posted Hide Post
So you want alternating colors, not based on the value of the sort field. This would take you back to the way I used to do alternating colors, computing a field and then using conditional styling. The following should do it. Notice that it has to use a multi-verb set because you have to compute the value on the sort field instead of the individual line.
-* File car.fex
TABLE FILE CAR
SUM COMPUTE CTR/I1=IF LAST CTR EQ 0 THEN 1 ELSE 0; NOPRINT
BY COUNTRY
PRINT 
     CAR
     DEALER_COST
BY COUNTRY
ON COUNTRY SUBTOTAL AS '*TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
     DEFMACRO=COND0001,
     MACTYPE=RULE,
     WHEN=CTR EQ 0,
$
     DEFMACRO=COND0002,
     MACTYPE=RULE,
     WHEN=CTR EQ 1,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
TYPE=DATA,
     COLUMN=N4,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N4,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N1,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=DATA,
     COLUMN=N2,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=DATA,
     COLUMN=N2,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
TYPE=SUBTOTAL,
     BY=1,
     BACKCOLOR='OLIVE',
     MACRO=COND0001,
$
TYPE=SUBTOTAL,
     BY=1,
     BACKCOLOR='YELLOW',
     MACRO=COND0002,
$
ENDSTYLE
END


As for the split-line, this has been addressed many times on the forum, so you can find a lot more examples if you do a search. You'll notice that both of your BY fields have NOPRINT on them which means that there is no space reserved for the "*TOTAL CAR xxxxxx" on the subtotal line. WF has no way of knowing whether this label is going to run over the top of the subtotals in the first column so by default it just splits the line with the label on the first row and subtotals on the second.

There are two ways around this. You can DEFINE a blank dummy field wide enough to hold your subtotals label. This becomes your first sort field. (So if you're using ReportCaster to burst or table of contents feature that relies on the primary sort, this fouls up the report.) You would also have to turn OFF the SQUEEZE and manually set the column widths for the other columns.

You can also manually recreate the subtotals line as a SUBFOOT, embedding ST.field and aligning them with the report columns.

Either way is a pain, but those are your options.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
thanks darin for your post.I am getting hold of things slowly.But for the split line as you suggested to include the subtotals in subfoot but i am using recompute at subtotals so the values will not get recomputed if i use ST in subfoot.any additions on this


7.6.4
Unix & Windows
Excel,HTML,PDF,PPT,AHTML


 
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Blank Lines & Colours on Subtotal

Copyright © 1996-2020 Information Builders