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     Forcing Page Break in Compound Report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Forcing Page Break in Compound Report
 Login/Join
 
Silver Member
posted
I have started a new topic on this since it's really a separate issue/question.

I have a compound focexec -- basically the main FOCEXEC queries for the selected search keys, and then rolls through and executes three different FOCEXECS which are concatenated into one compound report.

The ONLY issue I have at this point is FORCING the compound report break for every parent record. This works with them all concatenated together but i can't cause a page break to happen on the parent key field. I have tried putting the page break in the FOC_MAIN.FEX program but that apparently gets overridden by the NOBREAK directives in this FOCEXEC that compounds them all together. It seems like I should be able to indicate that I want to turn pagebreak back ON within this program, but I haven't found a reference to that yet. Suggestions?

Here's the barebones of what I have at this point. It works in that it creates one huge report with page breaks by sheer line number, but the "heading" of each page just falls wherever. What I want is for the compound report to force a break ONLY at the start of a new PARENT key record.

-* lots of lines collecting sort order and criteria from the calling program
-* primary data joins for the PARENT file reading
-* format the strings for heading information
-SET &SELKEY1 = IF &txtKEY1 EQ '' THEN '' ELSE ' Key 1: ' | &txtKEY1 ;
-SET &SELKEY2 = IF &txtKEY2 EQ '' THEN '' ELSE ' Key 2: ' | &txtKEY2 ;
..
-SET &SELKEYN = IF &txtKEYN EQ '' THEN '' ELSE ' Key N: ' | &txtKEYN ;
-SET &HEADSELECT = &SELKEY1 || &SELKEY2 || .. || &SELKEYN ;
-* ALSO BUILD A STRING HEADSORT FOR THE HEADER
-SET &HEADSORT = 'sorted by ..... ';

TABLE FILE PARENTVIEW
PRINT KEYFIELD

-COLLECT_SORTS
-* here establish the sort order as passed in by calling program


-BUILD_CRITERIA
-* here I build the various WHERE statements based on parameters
-IF &txtKEY1 EQ '' GOTO CK_KEY2;
WHERE KEY1 EQ '&txtKEY1'

-CK-KEY2
-IF &txtKEY2 EQ '' GOTO CK_KEYN;
WHERE KEY2 EQ '&txtKEY2'

-CK-KEYN
-IF &txtKEYN EQ '' GOTO DO_HOLD:
WHERE KEYN EQ '&txtKEYN'

-DO_HOLD
ON TABLE SAVE AS MYOUT FORMAT ALPHA
END
-IF &RECORDS EQ 0 GOTO NORPT;

-RUN
-SET &RECS = &LINES;
-SET &TEL = 1;

SET COMPOUND = OPEN NOBREAK
-GOTO VOLGEND
-START
-VOLGEND
-READ MYOUT &KEYFIELD.17.

-SET &MYKEYFIELD = SUBSTR(17,&KEYFIELD,7,17,11,MYKEYFIELD);

EX FOC_MAIN.FEX KEYFIELD=&MYKEYFIELD, HEADSORT='&HEADSORT', HEADSELECT='&HEADSELECT'

SET COMPOUND = NOBREAK

EX FOC_COMMENTS.FEX KEYFIELD=&MYKEYFIELD

-IF &TEL EQ &RECS GOTO FINISH;

SET COMPOUND = NOBREAK
EX FOC_MATERIALS.FEX KEYFIELD=&MYKEYFIELD

-SET &TEL = &TEL + 1;
-IF &TEL LE &RECS GOTO START;

-FINISH
SET COMPOUND = CLOSE
EX FOC_MATERIALS.FEX KEYFIELD=&MYKEYFIELD

-GOTO EXIT
-NORPT
-HTMLFORM NOREC2
-EXIT


WebFOCUS 7.1.5 on Win2K using SQL2000/SQL2005/ORACLE10.4
 
Posts: 47 | Registered: March 02, 2007Report This Post
Silver Member
posted Hide Post
Anyone? any ideas or suggestions? what can you do to force a page break in this situation?


WebFOCUS 7.1.5 on Win2K using SQL2000/SQL2005/ORACLE10.4
 
Posts: 47 | Registered: March 02, 2007Report This Post
Expert
posted Hide Post
Perhaps we can help out if you could set up a working example using the CAR file.

I don't know if this will make a difference but have you tried -INCLUDE's instead of EXEC's?


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
I think the NOBREAK is causing some of your problem. Try this code -
-* File cartest.fex
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
 ON TABLE PCHOLD FORMAT PDF
 ON COUNTRY PAGE-BREAK
END
-RUN
run within this code -
SET COMPOUND = OPEN
EX CARTEST
-RUN

EX CARTEST
-RUN

SET COMPOUND = CLOSE
EX CARTEST
-RUN
Which is a simplistic version of your proc.

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
<JJI>
posted
Francis,

WF versions below 7.1.3 don't work with the EX. At least I had that problem with a 7.1.1 version, so I suppose it's the same for 5.x. There you have to use the -INCLUDE. From 7.1.3 on EX is working fine.
 
Report This Post
Gold member
posted Hide Post
Dirk. I've got production code that uses EX with WF 5.3.2 (on AIX) It works fine, and I have compound reports too in that case. It also works on 7.1.4 and 7.1.7 Maybe the EX does not work on Windows?


Diptesh
WF 7.1.7 - AIX, MVS
 
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006Report This Post
Expert
posted Hide Post
EX works in windows, and as low as 528, but its tricky. (it was , according to the BGH, a loophole.)
put a space in front of the EX
go figure!
Interestingly, i thought EX had been killed..i'm delighted/confused to hear otherwise, and will now go test and never ever get any sleep. Wink




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
Silver Member
posted Hide Post
quote:
Originally posted by Tony A:
I think the NOBREAK is causing some of your problem.


Thanks! it was a combination of that AND a pagebreak that I found in one of the called FOCEXECs that was causing the problem. It's fixed now, appreciate it.


WebFOCUS 7.1.5 on Win2K using SQL2000/SQL2005/ORACLE10.4
 
Posts: 47 | Registered: March 02, 2007Report This Post
Expert
posted Hide Post
No problem, just pleased that your problem is resolved. Now you can enjoy the weekend Smiler

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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Forcing Page Break in Compound Report

Copyright © 1996-2020 Information Builders