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     [SOLVED] Styling ACROSS RECOMPUTE's

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Styling ACROSS RECOMPUTE's
 Login/Join
 
Member
posted
Hello,

I have a need to do a RECOMPUTE, as opposed to a ROW-TOTAL, in my ACROSS report. The examples below result in the same totals whether I use ROW-TOTAL or RECOMPUTE, but my question is how does one style a RECOMPUTE in an ACROSS report.

This works...

TABLE FILE CAR
SUM RCOST
BY COUNTRY
ACROSS CAR ROW-TOTAL
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=ROWTOTAL, COLOR=RED,$
ENDSTYLE
END

These don't...

TABLE FILE CAR
SUM RCOST
BY COUNTRY
ACROSS CAR RECOMPUTE
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=ROWTOTAL, COLOR=RED,$
ENDSTYLE
END

TABLE FILE CAR
SUM RCOST
BY COUNTRY
ACROSS CAR RECOMPUTE
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=RECOMPUTE, COLOR=RED,$
ENDSTYLE
END

No errors, the RECOMPUTEd column just doesn't style.

The ACROSS columns can vary from 1 to 8, so positional styling won't work without some fancy DM code, which I'm trying to avoid for the clients sake. This seems easy, just can't find it documented anywhere. Thanks!

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


PROD:WebFOCUS 7.6.11 on UNIX accessing FOCUS, Oracle, SQLServer
TEST: WebFOCUS 7.7.1 on UNIX accessing FOCUS, Oracle, SQLServer
 
Posts: 28 | Location: USA | Registered: March 24, 2005Report This Post
Expert
posted Hide Post
SUMMARIZE and RECOMPUTE are styled with the SUBTOTAL tag.


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, 2005Report This Post
Member
posted Hide Post
Francis,

SUBTOTAL styling works fine for column RECOMPUTES (BY statements), just not ACROSS RECOMPUTES.

TABLE FILE CAR
SUM RCOST
BY COUNTRY RECOMPUTE
ACROSS CAR RECOMPUTE
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLOR=RED,$
ENDSTYLE
END


Do you have an example of something that may work, if I'm not reading your reply correctly?


PROD:WebFOCUS 7.6.11 on UNIX accessing FOCUS, Oracle, SQLServer
TEST: WebFOCUS 7.7.1 on UNIX accessing FOCUS, Oracle, SQLServer
 
Posts: 28 | Location: USA | Registered: March 24, 2005Report This Post
Expert
posted Hide Post
Craig,

Sorry about that - I fired off my response without testing a fex with ACROSS.

DevStudio v7.6.8 removes the RECOMPUTE statement in the ACROSS when viewing the code in Report Painter which suggests it doesn't know what to do with it or that ACROSS RECOMPUTE is not supported (even though it works). Unfortunately I don't think you can style the RECOMPUTE column through normal means.

I have created the recomputed column-total in other ways which then can be styled. I hope someone has a better idea, because this is ugly, but here goes:

TABLE FILE CAR
SUM
COMPUTE FIELD1T/D10 = ( RETAIL_COST - DEALER_COST ) / DEALER_COST * 100;
AS 'TOTAL'
BY COUNTRY
SUM
COMPUTE FIELD1/D10 = ( RETAIL_COST - DEALER_COST ) / DEALER_COST * 100;
AS ''
BY COUNTRY
ACROSS CAR

ON COUNTRY RECOMPUTE AS 'TOTAL'

ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLOR=RED,$
TYPE=SUBTOTAL, COLUMN=FIELD1T, COLOR=GREEN,$
TYPE=REPORT, COLUMN=FIELD1T, COLOR=GREEN, SEQUENCE=99, $
ENDSTYLE
END

The SEQUENCE tag positions the recomputed column total as the last column in the report. Unfortunately, it also breaks the row-total line into two, which may be corrected by other ugly coding.


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, 2005Report This Post
Expert
posted Hide Post
If the number of rows is consistent, you could try styling the specific column:

TABLE FILE CAR
SUM RCOST
BY COUNTRY RECOMPUTE
ACROSS CAR RECOMPUTE
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLOR=RED, $
TYPE=SUBTOTAL, COLUMN=P12, COLOR=GREEN, $
TYPE=REPORT, COLUMN=P12, COLOR=GREEN,$
ENDSTYLE
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Francis,

You're absolutely right about 7.6.8 removing the ACROSS RECOMPUTE from the Report Painter, but it does still work.

Thanks for your input. Your last post was food for thought. I just had to figure out the last column of the report. So, this works and it's enough DM for the client to understand (which was one of their goals) ...

TABLE FILE CAR
BY CAR
ON TABLE HOLD AS JUNK
END
-RUN
-SET &COL = &LINES + 2;

TABLE FILE CAR
SUM RCOST
BY COUNTRY RECOMPUTE
ACROSS CAR RECOMPUTE
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=P&COL, COLOR=GREEN,$
ENDSTYLE
END

Thanks!


PROD:WebFOCUS 7.6.11 on UNIX accessing FOCUS, Oracle, SQLServer
TEST: WebFOCUS 7.7.1 on UNIX accessing FOCUS, Oracle, SQLServer
 
Posts: 28 | Location: USA | Registered: March 24, 2005Report This Post
Expert
posted Hide Post
Craig, you have a good solution.


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, 2005Report 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     [SOLVED] Styling ACROSS RECOMPUTE's

Copyright © 1996-2020 Information Builders