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] possible to have this layout of a 2 layer hierarchy

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] possible to have this layout of a 2 layer hierarchy
 Login/Join
 
Member
posted
Spent some time scanning through several of the 5.x manuals. Still unsure if this format is even possible. MULTILINES allows similar but not quite.

Let's start with this

TABLE FILE CAR
PRINT BODY.SALES
BY    COMP.CAR
BY    CARREC.MODEL
ON COMP.CAR SUBTOTAL MULTILINES
ON TABLE SET PAGE-NUM OFF 
ON TABLE COLUMN-TOTAL AS 'Totals'


which results in this

  
CAR          MODEL                  SALES 
-----        -------------          -----
ALFA ROMEO   2000 4 DOOR BERLINA     4800 
             2000 GT VELOCE         12400 
             2000 SPIDER VELOCE     13000 
  
*TOTAL CAR ALFA ROMEO               30200 

AUDI         100 LS 2 DOOR AUTO      7800 
  
BMW          2002 2 DOOR             8950 

etc.

In our data, the corresponding strings that replace Car and Model are both longer, and so to save on page real estate the group wants this style

ALFA ROMEO                 30200
    2000 4 DOOR BERLINA     4800 
    2000 GT VELOCE         12400 
    2000 SPIDER VELOCE     13000 
  
AUDI                        7800 
  
BMW                        80390
    2002 2 DOOR             8950 

etc.

Is this possible, and if so, please head me in the right direction (and I will continue my research).

thank you

Richard

This message has been edited. Last edited by: MTO-Solutions-Engineering,


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
 
Posts: 23 | Location: Toronto, Ontario, Canada | Registered: January 09, 2007Report This Post
Expert
posted Hide Post
Richard,

People usually use SUBHEAD or SUBFOOT if they require the SUBTOTAL line to appear different than the default.

The following example doesn't produce exactly what you require, but it is a suggestion you could build on.

TABLE FILE CAR
SUM
COMPUTE SALEST/D10 = SALES; NOPRINT
BY CAR NOPRINT
SUM
SALES/D10
BY CAR NOPRINT
BY MODEL
ON CAR SUBHEAD
"<CAR<SALEST"

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=SUBHEAD, HEADALIGN=BODY, STYLE=BOLD, $
TYPE=SUBHEAD, ITEM=2, JUSTIFY=RIGHT, $
ENDSTYLE
END

If you need to indent the detail lines, styling (dependent on the output type) can be used.


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
How about this:

SET SHOWBLANKS=ON
DEFINE FILE CAR
SORTFLD2/I2=1;
MODELSORT/A30=CAR;
END
TABLE FILE CAR
SUM SALES
COMPUTE SORTFLD1/I2=IF CAR NE LAST CAR THEN SORTFLD1+1 ELSE SORTFLD1; NOPRINT
BY TOTAL SORTFLD1
BY SORTFLD2
BY  CAR
BY  MODELSORT
ON TABLE HOLD AS CARHOLD FORMAT ALPHA
END
DEFINE FILE CAR
MODELSORT/A30='    '|MODEL;
END
TABLE FILE CAR
SUM SALES
COMPUTE SORTFLD1/I2=IF CAR NE LAST CAR THEN SORTFLD1+1 ELSE SORTFLD1; NOPRINT
COMPUTE SORTFLD2/I2=IF CAR NE LAST CAR THEN 2 ELSE SORTFLD2+1;
BY  CAR
BY TOTAL SORTFLD1
BY  MODELSORT
ON TABLE HOLD AS MDLHOLD FORMAT ALPHA
END
TABLE FILE CARHOLD
PRINT SALES
BY SORTFLD1 NOPRINT
BY SORTFLD2 NOPRINT
BY MODELSORT AS ''
MORE 
FILE MDLHOLD
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
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thank you Francis and Ginny for quick replies.

The one from Francis is obviously a bit easier to understand, and the one from Ginny amazed me in that the blanks before the names are preserved in HTML. It is obviously the SHOWBLANKS setting, but I cannot find it mentioned in any of our manuals!!! (I just did a search through over a dozen PDF files we have collected from WebFOCUS for 5.3 and no SHOWBLANKS!)

I have tested both suggestions and what both do not answer is how to do a MULTILINES style, in that for companies like AUDI, (which has only one model) we do NOT want the model listed.

Richard


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
 
Posts: 23 | Location: Toronto, Ontario, Canada | Registered: January 09, 2007Report This Post
Expert
posted Hide Post
Sorry but SHOWBLANKS came along in the 7.6 release. You could probably get around that by concatenating an unprintable character in front of the model. I apologize for not paying attention.

As for not displaying the model for Audi, I'm sure that you can take the counts I created and do additional testing to determine whether you should print the line or not.


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
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Interesting !!!

I am definitely using 5.3.2 and ...

SET SHOWBLANKS=ON

results in indentations working

and ...

-* SET SHOWBLANKS=ON

results in indentations NOT working.

Are you sure they did not have it in there all along but only announced it in 7? Smiler

Richard


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
 
Posts: 23 | Location: Toronto, Ontario, Canada | Registered: January 09, 2007Report This Post
Expert
posted Hide Post
Could have been. I'm glad it's working for you.

If you are up to a challenge, you could probably do my example with the MacGyver techniques and eliminate a pass of the data. Or do the detail hold first then the summary hold from the detail hold.


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
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
I will play with this some more and post my findings


Richard


MTO
WebFOCUS Dev Studio 5.3.2 (trying to upgrade to 7.x !)
Unix with Win XP front ends
output usually PDF (and some HTML and XLS at times)
 
Posts: 23 | Location: Toronto, Ontario, Canada | Registered: January 09, 2007Report 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] possible to have this layout of a 2 layer hierarchy

Copyright © 1996-2020 Information Builders