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]Best Practices for Displaying Long Reports

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Best Practices for Displaying Long Reports
 Login/Join
 
Silver Member
posted
Hello All,

I received rather simple request that has me scratching my head. I have a report that lists the top 20 cities that our customers are located in. It has a layout like this:

City 1 1 5%
City 2 1 5%
City 3 1 5%
City 4 1 5%
City 5 1 5%
City 6 1 5%
City 7 1 5%
City 8 1 5%
City 9 1 5%
City 10 1 5%


And one of my users asked if I could display the report like this instead:
City 1 1 5% City 6 1 5%
City 2 1 5% City 7 1 5%
City 3 1 5% City 8 1 5%
City 4 1 5% City 9 1 5%
City 5 1 5% City 10 1 5%

What is the best way to approach this? All of the ways I can think of to make the report display like this seem overly complicated. My first thought was to hold the data with a LIST, then do a define file to group them based on whether or not their LIST value is 1-5 or 6-10. This seems too complicated, and I was wondering what other analysts do with WebFOCUS when your reports get too "long". Any and all feedback is appreciated!

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.105M, Windows 10, App Studio
 
Posts: 47 | Registered: October 22, 2014Report This Post
Expert
posted Hide Post
You're right.
you're going to create a variable that you'll use as an ACROSS.
you can do this in a define or a compute, depending on how ordered your final data set is.
eg:
myvar/I1 = IF LAST myvar EQ 1 THEN 2 ELSE 1;
then
SUM CITY SOMETHING PERCENTAGEVALUE ACROSS myvar NOPRINT




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Here is one approach.

If you are using something like BY HIGHEST 20 in your report program, you may get more than 20 cities when there are ties. This happens in the CAR example below, where BY HIGHEST 10 SALES returns 11 MODELs instead of 10. The -SET Dialogue Manager logic determines where to split the initial output into two columns. In any case, you need to determine both row and column positions for each set of values. If you know your output will always have exactly 20 cities, it becomes a little simpler - you can skip the Dialogue Manager logic and simply replace variable &COL_SWITCH with the number 10.

TABLE FILE IBISAMP/CAR
 BY HIGHEST 10 SALES
 BY MODEL
 ON TABLE HOLD AS CAR_DATA
END
-*
-RUN
-SET &RPT_LINES  = &LINES ;
-SET &HALF       = &RPT_LINES / 2 ;
-SET &WHOLE      = &HALF * 2 ;
-SET &COL_SWITCH = IF (&WHOLE EQ &RPT_LINES) THEN &HALF ELSE (&HALF + 1);
-*
DEFINE FILE CAR_DATA
 COUNTER/I5 = LAST COUNTER + 1 ;
 ROW_NBR/I5 = IF (COUNTER FROM 1 TO &COL_SWITCH) THEN COUNTER ELSE (COUNTER - &COL_SWITCH);
 COL_NBR/I5 = IF (COUNTER FROM 1 TO &COL_SWITCH) THEN 1 ELSE 2 ;
END
-*
TABLE FILE CAR_DATA
 SUM MODEL SALES
 BY ROW_NBR      NOPRINT
 ACROSS COL_NBR  NOPRINT
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by Dan Satchell:
Here is one approach.

If you are using something like BY HIGHEST 20 in your report program, you may get more than 20 cities when there are ties. This happens in the CAR example below, where BY HIGHEST 10 SALES returns 11 MODELs instead of 10. The -SET Dialogue Manager logic determines where to split the initial output into two columns. In any case, you need to determine both row and column positions for each set of values. If you know your output will always have exactly 20 cities, it becomes a little simpler - you can skip the Dialogue Manager logic and simply replace variable &COL_SWITCH with the number 10.

TABLE FILE IBISAMP/CAR
 BY HIGHEST 10 SALES
 BY MODEL
 ON TABLE HOLD AS CAR_DATA
END
-*
-RUN
-SET &RPT_LINES  = &LINES ;
-SET &HALF       = &RPT_LINES / 2 ;
-SET &WHOLE      = &HALF * 2 ;
-SET &COL_SWITCH = IF (&WHOLE EQ &RPT_LINES) THEN &HALF ELSE (&HALF + 1);
-*
DEFINE FILE CAR_DATA
 COUNTER/I5 = LAST COUNTER + 1 ;
 ROW_NBR/I5 = IF (COUNTER FROM 1 TO &COL_SWITCH) THEN COUNTER ELSE (COUNTER - &COL_SWITCH);
 COL_NBR/I5 = IF (COUNTER FROM 1 TO &COL_SWITCH) THEN 1 ELSE 2 ;
END
-*
TABLE FILE CAR_DATA
 SUM MODEL SALES
 BY ROW_NBR      NOPRINT
 ACROSS COL_NBR  NOPRINT
END


This is perfect, thank you!


WebFOCUS 8.105M, Windows 10, App Studio
 
Posts: 47 | Registered: October 22, 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]Best Practices for Displaying Long Reports

Copyright © 1996-2020 Information Builders