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     controlling page breaks

Read-Only Read-Only Topic
Go
Search
Notify
Tools
controlling page breaks
 Login/Join
 
Platinum Member
posted
I have a report with PDF output. The report is set up to do a page break on employee so that the end report has one page per employee. The problem is that some employees have enough data that it creates a 2nd page for that employee. It's not a problem to have multiple pages for the employee, but is there a way to control where the report breaks to the 2nd page based on the amount of data?

Thanks for your help!
Bethany

Server Environment:Win2K3 Server
Apache Tomcat standalone application server
WF 7.1.3
DevStudio 7.1.4


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Virtuoso
posted Hide Post
When you say a way to control, do you mean on the employee data which flows to a second page?

There is a lines parameter that can set the number of lines per page.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
the command is

SET LINES = 66

or whatever you like

you will have to play with it, to get the best result, depends on header and footer size




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
if i understand you correctly, you don't want to page-break if the last employee has only a few remaining lines of data, is that right?
you can set up some switches
-* how many lines per page do you want
-SET &mylpp = 66 ;
-* how many lines tolerable for nobreak
-SET &mymin = 10 ;
-* a simple flag that increments on employee change
BODYCOUNT/I8=IF EMPLOYEE EQ LAST EMPLOYEE THEN LAST BODYCOUNT ELSE 1+ LAST BODYCOUNT;
-* whats the max lines per employee
LINENUM/I8=IF EMPLOYEE EQ LAST EMPLOYEE THEN LAST LINENUM + 1 ELSE 1;
-* how many remainder lines 
REMAIN/I2=IMOD( LINENUM, &mylpp , 'I2');
-* now a fake page-breaker  ; 
-* when you encounter a new guy and 
-*  the end of the last guy is less than your page break criteria 
-*  then dont page break.
DEALorNODEAL/I8=IF (EMPLOYEE NE LAST EMPLOYEE) AND ( LAST REMAIN LE &mymin) THEN LAST BODYCOUNT ELSE BODYCOUNT;
ON DEALorNODEAL PAGE-BREAK
ON EMPLOYEE SUBHEAD ...

(mske sure you have nice subheads to id the employee if you switch mid page)
...

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




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
Platinum Member
posted Hide Post
Does SET LINES = 66 work with PDF output???


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report This Post
Expert
posted Hide Post
It doesn't. I thought it did.

SET LINES = 5
TABLE FILE GGSALES
SUM
UNIT
DOLLAR
BY REGION
BY STCD
BY CATEGORY
BY PRODUCT
ON TABLE PCHOLD FORMAT PDF
END


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
Virtuoso
posted Hide Post
It used to work, haven't in a while though. I know in the 5.3.6 world I had a report I'd used it with due to footers. Suppose this is something that was 'fixed' recently.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
I will give it a try (tomorrow) my bed is calling....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
Good sleep, I just noticed you registered on my wedding anniversary. long way from here to Amsterdam.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
set lines should just set the place where the headers repeat, so for pdf i would set lines = 9999 and then pdf just handles its own re-headering.




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
Platinum Member
posted Hide Post
Hi, Bethany. I have what is an approach, more than a solution. I will shorthand it, on the assumption that you've been doing this a while, and can fill in the details.

This approach requires two passes (at least) at the data. First pass, in addition to printing your data, you count the number of lines per employee (emp_counter). Put that in a hold file. Second pass (the report, hopefully), you create some kind of field to break on. For example, you might use IMOD to get the remainder of a divison of emp_counter by 50. That remainder (emp_remainder) would be zero on every fiftieth record. Maybe create another variable - say pg_count - that starts at 1 and is incremented when emp_remainder = 0. So it's 1 for the first 50 records, 2 for the next 50, etc. Then sort by employee within pg_count and page-break on employee. Or by pg_count within employee and break on pg_count. Either will work, as long as you handle the details properly.

You can build a more sophisticated algorithm, if you want. Might take a third pass (not sure). You could specify a page break within employee at 50 lines only if the total lines for the employee exceeds 60, for example. The important point is counting lines by employee and using that to control the page break.


dwf
 
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005Report This Post
Expert
posted Hide Post
which would seem to be the code i just gave her a couple of posts up, si?




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
Platinum Member
posted Hide Post
Oh, Susannah Music You want me to read the posts before I reply to them? Excessive preparation.


dwf
 
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005Report This Post
Expert
posted Hide Post
Good One




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
Platinum Member
posted Hide Post
Thanks for the suggestions/solutions. I was able to make it work by adding an additional sort field and then use the NO SPLIT on the that field. I'll save the other solutions for another time when NOSPLIT won't do the trick...and I'm sure that day will eventually come.

Thanks again!


Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server
 
Posts: 188 | Registered: April 14, 2005Report 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     controlling page breaks

Copyright © 1996-2020 Information Builders