Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Totals for Across column using formatting on the fly
Go
New
Search
Notify
Tools
Reply
  
Totals for Across column using formatting on the fly
 Login/Join
 
Member
posted
Your tips on formatting on the fly solved a big problem when I want to print numbers and associated dollars ACROSS some codes ACROSS type(# or $).

The problem is that my ON TABLE COLUMN-TOTAL the across field that is either # or $ is formatted 1 way or the other seemingly without reference to that particular column's format. Is there any way to control the format of the column on the subtotal or total so that it matches the values in that particular column?


WebFOCUS 7.6.11
Windows
Excel, PDF, HTML, csv
 
Posts: 17 | Registered: September 17, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
I've never noticed that behaviour. We love sample code on this forum, so if you can put together an example of what you describe, we can try to work it out. Use one of the sample data files, like CAR, or GGSALES.

Have you tried ACROSS-TOTAL instead? Here's code you can run:

TABLE FILE CAR
SUM
SALES/D10M
RETAIL_COST/P10C
ACROSS COUNTRY 
ACROSS-TOTAL

BY SEATS

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=8,
$
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, 2005Reply With QuoteReport This Post
Member
posted Hide Post
ACROSS-TOTAL doesn't really get the total I want. Here's an example based on CAR.

DEFINE FILE CAR
SALESFLG/A1 = IF COUNTRY EQ 'ENGLAND' THEN 'N' ELSE 'Y';
AMOUNT/D12.2 = IF SALESFLG EQ 'Y' THEN SALES ELSE RETAIL_COST;
END

TABLE FILE CAR
SUM
COMPUTE MYFMT/A8 = IF SALESFLG EQ 'Y' THEN 'D12.2M' ELSE 'D12.2C'; NOPRINT
AMOUNT/MYFMT AS 'Amount'
ACROSS COUNTRY
BY SEATS

ON TABLE COLUMN-TOTAL AMOUNT
ON TABLE PCHOLD FORMAT EXL2K
END
-EXIT

The point is that within the across some columns will always be amounts that should be displayed with $ and others will be identical size numbers (D12.2) which should be displayed without $. The individual rows hold the formatting on the fly perfectly but the formatting on the totals seems to depend on whether or not the last row has a value in that column, and I cannot count on that.


WebFOCUS 7.6.11
Windows
Excel, PDF, HTML, csv
 
Posts: 17 | Registered: September 17, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
The format is based on a row value SALESFLG, which is not available on the total row, how would you like the format to be determined for the total row?


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, 2005Reply With QuoteReport This Post
Member
posted Hide Post
What I'd really like is having it based on the values of the Across names. So in the example based on the value of Country. Don't know if that's possible. In my case I have multiple ACROSS statements that enforce a sort order value that's constant but the number of the subsort values within the sort groupings are unknown.


WebFOCUS 7.6.11
Windows
Excel, PDF, HTML, csv
 
Posts: 17 | Registered: September 17, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
Hi EED,

I passed this one to FOCUS people and was told that it cannot be done in the way you want it.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1950 | Location: New York | Registered: November 16, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Totals for Across column using formatting on the fly

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.