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     Compound PDFs to start with Page 1

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Compound PDFs to start with Page 1
 Login/Join
 
Guru
posted
Hi everyone!
I have a user who wants to compound several reports but doesn't want the consecutive page numbering. She wants each report in the compound document to start with page 1. I've tried using tabpageno and focfirstpage independently, but it doesn't seem to work. Now you're asking then why compound the report? She needs the output all in one file. We are using WebFOCUS release 5.2.4
Any ideas?

Thanks and have a great day,
Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Virtuoso
posted Hide Post
Try setting &FOCNEXTPAGE = 1 before each additional report to be added to the PDF.
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Guru
posted Hide Post
Hi Mickey,
Still can't get it right, here's the simplified code..... I've tried it with a SET and a -SET

APP PREPENDPATH CARTST
-SET &FOCFIRSTPAGE = 1 ;
-RUN
TABLE FILE CAR
SUM COUNTRY
BY COUNTRY
ON TABLE PCHOLD FORMAT PDF OPEN
HEADING CENTER
"REPORT NUMBER 1"
END
-SET &FOCFIRSTPAGE = 1 ;
-RUN
TABLE FILE CAR
SUM MODEL
BY MODEL
ON TABLE PCHOLD FORMAT PDF
HEADING CENTER
"REPORT NUMBER 2"
END
-SET &FOCFIRSTPAGE = 1 ;
-RUN
TABLE FILE CAR
PRINT COUNTRY MODEL
ON TABLE PCHOLD FORMAT PDF CLOSE
HEADING CENTER
"REPORT NUMBER 3"
END

Thanks!
Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Guru
posted Hide Post
Give this a try:

SET FOCFIRSTPAGE = 1
SET COMPOUND = OPEN
TABLE FILE CAR
HEADING
"PRINT COUNTRY
ON TABLE PCHOLD FORMAT PDF
END
-RUN
SET FOCFIRSTPAGE = &FOCNEXTPAGE


TABLE FILE CAR
HEADING
"PRINT CAR
ON TABLE PCHOLD FORMAT PDF
END
-RUN

SET COMPOUND = CLOSE
SET FOCFIRSTPAGE = &FOCNEXTPAGE
TABLE FILE CAR
HEADING
"PRINT MODEL
ON TABLE PCHOLD FORMAT PDF
END
-RUN

This message has been edited. Last edited by: <Maryellen>,
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Oh shucks, I got excited there for a moment, but it still gave me page 1, 2 and 3 and I need page 1, 1 and 1

Thank you CurtisA. I'm wondering if it's the release that we're on WF 5.2.4

Thanks again!
Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Guru
posted Hide Post
Carol,
Where you able to create a workaround for this? I have ran into the same problem now. Do you know if a workaround was created in WF 7?
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Hi reFOCUSing,
I have not found a workaround for this problem and we are living with it for now since it's not a show stopper. I'm not sure if it's fixed in WF7, but will test that soon as I can. We have WF7 living on a standalone server and I'm going to be testing. I'll be happy to post my results.

Thanks,
Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
SET FOCFIRSTPAGE = 1

in between compound PDF reports does not appear to work in 5.3.4 - the page numbers are sequential.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
I have WF 7 running and it is not fixed in that environment.

I have put a case in with IBI and I will post a workaround if one is given.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Thanks for trying it in WF7, you're saving me time! I would love a solution if anyone comes up with a workaround.

Thanks again!
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Expert
posted Hide Post
The workaround! The trick is to manipulate the page number. It's important that the HEADING is after the COMPUTE REP_PAGE.


-SET &ECHO=ALL;

USE
C:\ibi\apps\Samples\CENTORD.FOC
END
-RUN

SET PAGE-NUM=OFF
SET ORIENTATION=LANDSCAPE
-RUN

-*-- Report 1 --------------------------

SET COMPOUND = OPEN
-RUN

TABLE FILE CENTORD
SUM LINEPRICE
BY PLANT
BY PRODCAT
HEADING
"Sales Report "
"Page<TABPAGENO"
" "
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Sales', $
TYPE=HEADING, STYLE=BOLD, COLOR=BLUE, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN

-*-- Report 2 --------------------------

TABLE FILE CENTORD
SUM QUANTITY
COMPUTE REP_PAGE/I4 = TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT
BY PLANT
BY PRODCAT
HEADING
"Inventory Report 1"
"Page<REP_PAGE"
" "
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Inventory 1', $
TYPE=HEADING, STYLE=BOLD, COLOR=RED, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN

-*-- Report 3 --------------------------

TABLE FILE CENTORD
SUM QUANTITY
COMPUTE REP_PAGE/I4 = TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT
BY PLANT
BY PROD_NUM
HEADING
"Inventory Report 2"
"Page<REP_PAGE"
" "
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Inventory 2', $
TYPE=HEADING, STYLE=BOLD, COLOR=ORANGE, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN

-*-- Report 4 --------------------------

SET COMPOUND = CLOSE
-RUN

TABLE FILE CENTORD
SUM LINE_COGS
COMPUTE REP_PAGE/I4 = TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT
BY PLANT
BY PRODCAT
HEADING
"Cost of Goods Sold Report"
"Page<REP_PAGE"
" "
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Cost of Goods Sold', $
TYPE=HEADING, STYLE=BOLD, COLOR=GREEN, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
-RUN
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Francis,
Thanks for the workaround. I modified your code a little and figured I would share.

Since our reports could be in any order (don't know which is the first report). I added the COMPUTE of REP_PAGE to every report (with some changes) and then changed the HEADING to not use TABPAGENO.

Here are my changes:
-* REP_PAGE was changed to this for all reports.
COMPUTE REP_PAGE/I4 = IF &FOCNEXTPAGE EQ 0 THEN TABPAGENO ELSE TABPAGENO - &FOCNEXTPAGE + 1; NOPRINT

-* HEADING was changed to this for all reports.
"Page<REP_PAGE of <TABLASTPAGE"
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Thanks a million Francis and reFOCUSing, you guys really are Guru's!!!

Carol
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Guru
posted Hide Post
Figured I would share this. When doing some searching on TABLASTPAGE I came across this case. Which uses REPAGE to workaround this problem for PDF. What's great is this solution will work for EXL2K, HTML and PDF with no custom coding. I'm sooo glad techsupport was so quick in telling me there is no workaround, when a solution is on the IBI site. Confused


I cleaned the code up a bit:
-DEFAULT &WFFMT = PDF
DEFINE FILE CAR
BLANK/A1 = ' ';
END
-RUN
-*****************************
-* REPORT #1
-*****************************
TABLE FILE CAR
PRINT
DEALER_COST
RETAIL_COST
BY BLANK NOPRINT REPAGE
HEADING
"Page "THIS IS REPORT #1"
ON TABLE SET PAGE-NUM ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT OPEN
END
-RUN
-*****************************
-* REPORT #2
-*****************************
TABLE FILE CAR
PRINT
STANDARD
BODYTYPE
BY BLANK NOPRINT REPAGE
HEADING
"Page "THIS IS REPORT #2 "
ON TABLE SET PAGE-NUM ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT
END
-RUN
-*****************************
-* REPORT #3
-*****************************
TABLE FILE CAR
PRINT
COUNTRY
CAR
MODEL
BY BLANK NOPRINT REPAGE
HEADING
"Page "THIS IS REPORT #3 "
ON TABLE SET PAGE-NUM ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT
END
-RUN
-*****************************
-* REPORT #4
-*****************************
TABLE FILE CAR
PRINT
COUNTRY
BY BLANK NOPRINT REPAGE
BY CAR
BY MODEL
ON CAR PAGE-BREAK
HEADING
"Page "THIS IS REPORT #4 "
ON TABLE SET PAGE-NUM ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT CLOSE
END
-RUN

This message has been edited. Last edited by: <Maryellen>,
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Thanks reFOCUSing, my user is very happy! Focal Point rules in getting answers, so many great developers out there and as always, many ways to do things in FOCUS.
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Platinum Member
posted Hide Post
how do I use page numbering in a specific text line in a compouond report?
The commpound report may vary in the number of pages.

Is there something I can put instead of "Page #1" literal in this heading? FOCNEXTPAGE and FOCFIRSTPAGE don't seem to work.

OBJECT=STRING, NAME='header1', TEXT='Page #1', POSITION=(6.8 1.09), MARKUP=ON, WRAP=ON, DIMENSION=(5.0 0.167), style=bold, METADATA='', $


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Virtuoso
posted Hide Post
quote:
OBJECT=STRING, NAME='header1', TEXT='Page #1', POSITION=(6.8 1.09), MARKUP=ON, WRAP=ON, DIMENSION=(5.0 0.167), style=bold, METADATA='', $

In stead of page #1, you can use
<ibi-page-number/>
.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Thanks. Is there any way to get this number to start with a page number other than 1?


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Platinum Member
posted Hide Post
Never mind. I see that it will increment the pages numbers based on the number of pages in the compound report.


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Platinum Member
posted Hide Post
Is there any way to use ibi-page-number in a Compound Report component instead of an OBJECT=STRING?

The reason I'm asking is that I want the pages to be numbered correctly in case of overflow page(s).


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Expert
posted Hide Post
I wonder if this thread should win an award, 11,489 views in 5 years!

I apologize for not posting anything useful!


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
I'm not totally sure, but I think this has to be in a string to get translated. I have put this in the master layout and as far as I know, it takes overflow pages into account if put in the master page. But it's been a while since I even looked at it, so I may be wrong.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 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     Compound PDFs to start with Page 1

Copyright © 1996-2020 Information Builders