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]Conditionally suppress row-total when results have only one across column

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Conditionally suppress row-total when results have only one across column
 Login/Join
 
Member
posted
Hello all,

I have been searching for a way to mimic the "multilines" behavior that works for subtotals, and apply it to the row-total. What I'd like is for the row-total to appear if there is more than one across column showing on the report, but not appear when there is only one (which is what the multilines does for the subtotals).

I have seen some posts suggesting to count the number of selections made for the across column and use that to either include or not include the "ON TABLE ROW-TOTAL AS 'TOTAL'" line, but with my particular situation, the user could select more than one value, and the report might actually only contain one of those values in the results. I think I'll have to end up doing a hold file, but since I'm a newbie, I wonder if there is a more ninja way to do that?

I'm including a simple example using the car file:
TABLE FILE GA_CAR
PRINT
     GA_CAR.BODY.SEATS
BY  LOWEST GA_CAR.ORIGIN.COUNTRY
ACROSS LOWEST GA_CAR.BODY.BODYTYPE

ON GA_CAR.ORIGIN.COUNTRY SUBTOTAL MULTILINES AS '*TOTAL'
WHERE ( GA_CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN GA_CAR)).COUNTRY:. ) AND ( GA_CAR.BODY.BODYTYPE EQ &BODYTYPE.(OR(FIND BODYTYPE IN GA_CAR)).BODYTYPE. );
ON TABLE SET HTMLENCODE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END  


If you run this nonsensical report and select England and France for the countries, and Convertible and Coupe for the body types, I'd like to suppress the row-total. If you select England and France for the countries, and Convertible and Sedan for the body types, then I'd like it to show up.

Does anybody know of a simple, straightforward way to do that?

Thanks,
Chris

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


WebFOCUS 8.1.03
Excel, PDF, HTML, Active Reports
 
Posts: 13 | Registered: February 23, 2014Report This Post
Expert
posted Hide Post
I think that your best bet is to count the number of selections made for the across column and use that to either include or not include the "ON TABLE ROW-TOTAL AS 'TOTAL'" line. Just do that using a preprocessing extraneous hold file using &LINES. It's simple and straight forward.

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Member
posted Hide Post
I mentioned that with my particular situation, the report might only contain one of the selected values, even though they might choose four different options. So that alas is not a solution.

Any other ideas?

Thanks,
Chris


WebFOCUS 8.1.03
Excel, PDF, HTML, Active Reports
 
Posts: 13 | Registered: February 23, 2014Report This Post
Master
posted Hide Post
BC_Chris,

You could do something like this:

TABLE FILE CAR
   SUM SALES
   BY BODYTYPE
WHERE ....whatever your want...
ON TABLE HOLD AS DUMMY
END
-RUN

-SET &ROW_TOTAL = IF &LINES GT 1 THEN 'ON TABLE ROW-TOTAL AS ''TOTAL'' ELSE '';

TABLE FILE CAR
   SUM ...
   BY  ...
WHERE ....whatever your want...
ON TABLE NOTOTAL
&ROW_TOTAL
ON TABLE PCHOLD FORMAT HTML
END


Does that help?

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Member
posted Hide Post
Thanks, Guru Dave. That was my original thought, but I wanted to see if perhaps I was missing another method to do the same thing.

Chris


WebFOCUS 8.1.03
Excel, PDF, HTML, Active Reports
 
Posts: 13 | Registered: February 23, 2014Report 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]Conditionally suppress row-total when results have only one across column

Copyright © 1996-2020 Information Builders