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     Breaking table on ACROSS field?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Breaking table on ACROSS field?
 Login/Join
 
Virtuoso
posted
I have a table similar to this one:
TABLE FILE CAR
SUM DEALER_COST SALES
ACROSS COUNTRY AS 'Car'
ACROSS CAR AS ''
BY SEATS AS 'Month' ROWS 1 OVER 2 OVER 3 OVER 4 OVER 5 OVER 6 OVER 7 OVER 8 OVER 9 OVER 10 OVER 11 OVER 12
END


The output is PDF on an A4 format page (landscape), but the page isn't wide enough to fit the table. This report is part of a compound report, which doesn't seem to be able to deal with reports that span multiple pages horizontally!

Hence, I would like to break my table on COUNTRY, but I don't know how to do that.

The result would be a series of tables, with 12 rows each (12 months) and column headings:
   ENGLAND
   JAGUAR JENSEN TRIUMPH
 1 ...
 2
...
12

In the 2nd table:
FRANCE
PEUGEOT

In the 3rd table:
ITALY
ALFA ROMEO MASERATI


...etc.

Can this be done?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
This is a difficult one.

I would suggest numbering the countries/Cars, 1-n.

Then Assign the numbers to columns.

Use this column number for the across

And finally put the titles in the heading.

A bit of work, but can be done.

The only other way I can think of doing this would be to create a loop and produce one "Panel" of data at a time in the compound report


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
You could multi-pass your data but that may not be best for the amount of data that you have. It will depend upon the number of breaks that you wish to have, however, it may be the solution you want.

TABLE FILE CAR
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS CTRIES
END
-RUN
-SET &CtyrCount = &LINES;

-READ CTRIES NOCLOSE &Country.10
-REPEAT :Loop WHILE &IORETURN EQ 0;
TABLE FILE CAR
  SUM DEALER_COST
      SALES
ACROSS COUNTRY AS 'Car'
ACROSS CAR AS ''
    BY SEATS AS 'Month' ROWS 1 OVER 2 OVER 3 OVER 4 OVER 5 OVER 6
	                    OVER 7 OVER 8 OVER 9 OVER 10 OVER 11 OVER 12
WHERE COUNTRY EQ &Country.QUOTEDSTRING
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
ENDSTYLE
END
-RUN
-READ CTRIES NOCLOSE &Country.10
-:Loop

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Waz:
This is a difficult one.

I would suggest numbering the countries/Cars, 1-n.

Then Assign the numbers to columns.

Use this column number for the across

And finally put the titles in the heading.

A bit of work, but can be done.


I must be missing something, how does that result in multiple tables?

EDIT: Oh wait, I think I see where you're going! The column numbers mean I only get relevant ACROSS-columns per COUNTRY/CAR, while I then can group by COUNTRY and put appropriate heading labels in a SUBHEAD on COUNTRY. Sounds easier than it is, but yeah...

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Tony A:
You could multi-pass your data but that may not be best for the amount of data that you have. It will depend upon the number of breaks that you wish to have, however, it may be the solution you want.


I think it is. I'm running into two problems with this solution though:

  • Storing a temporary ASCII file with selection criteria in the project directory is not concurrency-safe; Multiple users accessing the report at the same time with different criteria will get the wrong results or none at all.
  • The generated PDF only shows the first table (HTML correctly shows them all). I fixed that using SET COMPOUND=[OPEN|CLOSE], but when executed within the compound report it causes an error: (FOC3296) Error found in Coordinated Compound Report: At Component report4


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Not sure how you are coding the compound doc but try this (which works) -

Place this in a focexec within your app path, and name it wep_compound_rep -

-* File wep_compound_rep.fex
TABLE FILE CAR
  SUM DEALER_COST
      SALES
ACROSS COUNTRY AS 'Car'
ACROSS CAR AS ''
    BY SEATS AS 'Month' ROWS 1 OVER 2 OVER 3 OVER 4 OVER 5 OVER 6
	                    OVER 7 OVER 8 OVER 9 OVER 10 OVER 11 OVER 12
WHERE COUNTRY EQ &Country.QUOTEDSTRING
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=9, $
ENDSTYLE
END
-RUN

Then create a new fex called wep_compound_ctrl and place this code within it.
TABLE FILE CAR
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS CTRIES
END
-RUN

SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=A4, SHOW_GLOBALFILTER=OFF, $
-REPEAT :Loop1 FOR &Cnt FROM 1 TO &LINES;
PAGELAYOUT=&Cnt.EVAL, NAME='Page layout &Cnt.EVAL', text='Page layout &Cnt.EVAL', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, $
COMPONENT='report&Cnt.EVAL', TEXT='report&Cnt.EVAL', TOC-LEVEL=2, POSITION=(0.521 0.521), DIMENSION=(7.500 *), $
-:Loop1
END

-SET &Cnt = 1;
-READ CTRIES NOCLOSE &Country.10
-REPEAT :Loop2 WHILE &IORETURN EQ 0;
SET COMPONENT='report&Cnt.EVAL'
-INCLUDE wep_compound_rep.fex
-SET &Cnt = &Cnt + 1;
-READ CTRIES NOCLOSE &Country.10
-:Loop2
COMPOUND END

Now run the wep_compound_ctrl and you should have the report required.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
quote:
EDIT: Oh wait, I think I see where you're going!


Ah, thank the FOCUS Gods, I thought I was way up the wrong creek.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
This approach only works in release 7.7 (because of HIDENULLACRS), and only with PAGE-BREAK on COUNTRY.

TABLE FILE CAR
 SUM
  DEALER_COST
  SALES
  COMPUTE COL_NUM/I5 = IF (COUNTRY NE LAST COUNTRY) THEN 1 ELSE (LAST COL_NUM + 1);
 BY COUNTRY
 BY CAR
 BY SEATS
 ON TABLE HOLD AS CARHOLD
END
-*
TABLE FILE CARHOLD
 SUM
  DEALER_COST
  SALES
 BY COUNTRY NOPRINT PAGE-BREAK
 BY SEATS AS 'Month' ROWS 1 OVER 2 OVER 3 OVER 4 OVER 5 OVER 6 OVER 7 OVER 8 OVER 9 OVER 10 OVER 11 OVER 12
 ACROSS COUNTRY AS 'Country / Car'
 ACROSS COL_NUM NOPRINT
 ACROSS CAR AS ''
 ON TABLE SET ORIENTATION LANDSCAPE
 ON TABLE SET HIDENULLACRS ON
-* ON TABLE SET ACROSSTITLE SIDE
 ON TABLE PCHOLD FORMAT PDF
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 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     Breaking table on ACROSS field?

Copyright © 1996-2020 Information Builders