Focal Point
[SOLVED] Conditional Color Styling in Data Section

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

August 26, 2009, 02:27 PM
Laurie
[SOLVED] Conditional Color Styling in Data Section
We use alternate data color in the style sheet and have multiple BY fields. When there is only one line of data for each BY detail data field the report looks very choppy because it has the first BY group with one light blue data line, the next BY grouping has no color and the third grouping has one line of light blue data again.

Is there anyway to conditionally tell the style sheet to use alternate color based on a BY field in the data section? Am I clear in what we want to accomplish?

This message has been edited. Last edited by: Kerry,
August 26, 2009, 04:11 PM
Doug
Yes thaere is... You may consider using Conditional Formatting against another, DEFINEd or COMPUTEd, field which would be a field which identifies the row being printed (something like a 1 or 0). Your Conditional Formatting would set the BACKCOLOR based on the value of that DEFINEd field. That way the BACKCOLOR of the first line of all sorts would be "COLOR1" alternating with "COLOR2" for the other Conditional Format.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
August 26, 2009, 04:42 PM
GinnyJakes
See BACKCOLOR(BY=fieldname...) entry
This can be done from the Report Painter. It colors lines for all sort groups in alternating colors.


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
August 26, 2009, 04:55 PM
Laurie
When I go to Style and select Subhead, my only options are none and single color. Is that what you are referring to when you said it was available in Report Painter? There is no alternating color for Subhead.
August 26, 2009, 05:00 PM
Doug
That's right:
quote:
There is no alternating color for Subhead.
However, you CAN use a different BACKCOLOR for selected LINEs in a SUBHEAD.
August 26, 2009, 05:10 PM
GinnyJakes
It's under Data, background color.


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
August 26, 2009, 05:11 PM
GinnyJakes
Here is a sample:
-* File car_backcolor_by_sortgroup.fex
TABLE FILE CAR
PRINT
     SALES
BY COUNTRY
BY CAR
BY MODEL
HEADING
"Backcolor Report Lines by Sort Group"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=ON,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=DATA,
     BACKCOLOR=( BY=B1 'SILVER' 'FUCHSIA' ),
$
TYPE=TITLE,
     BACKCOLOR='FUCHSIA',
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     JUSTIFY=CENTER,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     BACKCOLOR='SILVER',
$
TYPE=FOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=SUBHEAD,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
     SIZE=9,
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     BACKCOLOR=RGB(210 210 210),
     STYLE=BOLD,
$
ENDSTYLE
END



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
August 26, 2009, 05:11 PM
Darin Lee
There is a very similar post currently in discussion which may give you some ideas.

It is found here.


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
August 27, 2009, 10:13 AM
Laurie
We have 432 reports and so I was looking for a standard way across the board to have the color based on the detail in the second BY value to be a specific color. Since this has would have to be coded individually in every report, it is not a good option. I will try to find another way for our reports to display consistent color. Thanks for your suggestions.
September 03, 2009, 10:23 AM
Kerry
FYI, info from Laurie: We have so many variations of subtotal reports, we did not want to customize every single one so that the first line of a subtotal detail was consistently colored.

We decided to use a horizontal underline in between subtotal levels to make the break more visible. Thanks for the suggestions.


Many thanks for everyone's input.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.