Focal Point
[CLOSED] Stylesheet for the text in a Subtotal?

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

May 26, 2009, 03:06 PM
Jason K.
[CLOSED] Stylesheet for the text in a Subtotal?
I have a Subtotal that looks like
Total Intangibles $1.00

Where the Total is put in by the system
and the "Intangibles" is something I added.

Is it possible to color the Total black, and the word "Intangibles" in red? The report painter only lets us change the text color for all.

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


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
May 26, 2009, 03:31 PM
Francis Mariani
Jason,

I can't think of a way to do this.

In HTML there is a CSS pseudo-element called first-letter but there isn't one for first-word.

W3Schools: CSS Pseudo-elements


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
May 26, 2009, 04:14 PM
Darin Lee
If the output is html, you can code the html tags into the text and they will appear correctly when the report is displayed.

TABLE FILE CAR
PRINT CAR RCOST
BY COUNTRY 
ON COUNTRY SUBTOTAL AS 'Total <font color=RED>Retail Cost</font>'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=10,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
$
ENDSTYLE
END


Other than that, there really isn't a way to use a WF stylesheet to accomplish what you're looking for.


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
May 26, 2009, 04:49 PM
mgrackin
Jason,

Can you post the code that generates the SUBTOTAL? From the way you are descibing it, it sounds like you might be using a SUBFOOT to generate the subtotal line. Your desciption in your first post is a bit confusing when you say YOU added the word intangibles and the SYSTEM/FOCUS put the word total in there. Normally when you override the default row title for the SUBTOTAL line you completely replace the default text not half and half.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
May 26, 2009, 05:06 PM
Francis Mariani
This workd for HTML and EXL2K:

TABLE FILE CAR
SUM
SALES
BY COUNTRY
BY CAR
BY MODEL
ON COUNTRY SUB-TOTAL AS '<SPAN STYLE="COLOR: RED;">TOTAL</SPAN>'
-*ON TABLE PCHOLD FORMAT EXL2K
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
May 27, 2009, 03:14 AM
Danny-SRL
Jason,

Developing on Francis's idea:
  
TABLE FILE CAR
SUM 
     SALES
BY COUNTRY
BY CAR
BY MODEL
     
ON COUNTRY SUBTOTAL AS '<SPAN STYLE="COLOR: BLACK;">Total</SPAN>' 
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLOR=RED, WHEN=COUNTRY NE 'FRANCE', $
TYPE=SUBTOTAL, COLOR=BLUE, WHEN=COUNTRY EQ 'FRANCE', $
TYPE=SUBTOTAL, COLUMN=SALES, COLOR=BLACK, $
ENDSTYLE
END

Or, for multi-colored subtotal text:
  
TABLE FILE CAR
SUM 
     SALES
BY COUNTRY
BY CAR
BY MODEL
     
ON COUNTRY SUBTOTAL AS '<SPAN STYLE="COLOR: BLACK;">Total </SPAN><SPAN STYLE="COLOR: red;">Country</SPAN>' 
ON TABLE SET STYLE *
ENDSTYLE
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF