Focal Point
[CLOSED] Conditionally PRINT and COLOR SUBFOOTS lines

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

May 15, 2014, 11:13 AM
WF8Developer
[CLOSED] Conditionally PRINT and COLOR SUBFOOTS lines
We have a detail data HTML report (Also PDF,XL,PPT,AHTML). The report has multiple SUBFOOT lines displaying the $ST.AMOUNT based on COUNTRY. We are getting all the right numbers in the right places using information found on FocalPOINT.

The current question deals with STYLING the SUBFOOTs. The end user has two styling conditions:
1)The $ST.AMOUNT to be bracketed and RED when LT 0.
2)If all the data on the SUBFOOT line EQ 0, then they don't want to see that SUBFOOT line.

We have the report displaying negative numbers in red brackets.

We are not able to make $0 SUBFOOT lines disappear (NOPRINT?) and then what happens if SUBFOOT line 1 is hidden? Will that change the LINE= count and change our RED BRACKET formatting for SUBFOOT LINE=2 and SUBFOOT LINE=3...?

We are able to meet condition 1 or condition 2, but not both.

Has anyone dealt with this problem or can offer (always much appreciated)advice?

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


Production: WebFOCUS 7.703 & 8.104,
All output formats.
Win7-64,MS Office 2013.
Sandbox 8009
May 15, 2014, 01:31 PM
Francis Mariani
Have you looked into the WHEN attribute for the SUBFOOT command?


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 15, 2014, 02:15 PM
WF8Developer
Francis-First off, Thanks and yes the WHEN clause is being employed. But am I applying it correctly or is there another way to apply it?

The brackets come a format modifier so that isn't an issue. I can't find the right combination of code to get a negative SUBFOOT to turn RED AND to make a SUBFOOT with all ZERO values to disappear. So I built a compact .fex where I can change parms easily and run.

I've used stylesheets and have always got on with them. Then you get an out of ordinary request and you find out how far you can push it. I just now got to what I think is the crux of the problem

What I have now to get the ZERO SUBFOOT to disappear is an (abbreviated) structure:
ON FIRM SUBFOOT
  "POUNDS <ST.AMT_POUNDS"
     WHEN ....
ON FIRM SUBFOOT
  "DOLLARS <ST.AMT_DOLLARS"
     WHEN ....
ON FIRM SUBFOOT
  "CANADIAN <ST.AMT_CANADIAN"
     WHEN ....

The (abbreviated) structure for coloring negative numbers RED is:
ON FIRM SUBFOOT
  "POUNDS: <ST.POUNDS"
  "DOLLARS: <ST.DOLLARS"
  "CANADIAN: <ST.CANADIAN"



Using various colors with BACKCOLOR I have found: In the first example, WebFOCUS sees ALL the SUBFOOTS as LINE=1. In the second example, WebFOCUS sees POUNDS as LINE=1, DOLLARS and LINE=2 and CANADIAN as LINE=3.

More serious users of stylesheets might already know that. This casual user just learned. Now I have to see if I can cross-breed the two and come up with a hy-bred, not a mutt.

I am anticipating a problem. If I make the POUNDS row disappear, then my references for DOLLARS would/could change from LINE=2 to LINE=1 and be out of synch with the stylesheet commands.

This could be a downward spiral, but if you have any observations, please chime in. Again, Thanks.

PS

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


Production: WebFOCUS 7.703 & 8.104,
All output formats.
Win7-64,MS Office 2013.
Sandbox 8009
May 15, 2014, 02:31 PM
Francis Mariani
Unfortunately, you code got garbled. Always put code between code tags:

[code]

ON FIRM SUBFOOT
...
[/code]



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