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     [CLOSED] Page number in compound pdf report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Page number in compound pdf report
 Login/Join
 
Platinum Member
posted
I am trying to get the Page count in the report by doing
-SET &CNT=1;
-*SET PRINTPLUS=ON
-REPEAT PRGLOOP 2 TIMES
SET FOCFIRSTPAGE = 1
SET COMPOUND = OPEN
TABLE FILE CAR
ON TABLE SUBHEAD
"Page HEADING
"COUNTRY "
PRINT COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END
-RUN

SET FOCFIRSTPAGE = &FOCNEXTPAGE

TABLE FILE CAR
ON TABLE SUBHEAD
"Page HEADING
"CAR"
PRINT CAR
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END
-RUN

-SET &COMPVAL=IF &CNT EQ 2 THEN 'CLOSE' ELSE '';
SET COMPOUND =&COMPVAL ;
SET FOCFIRSTPAGE = &FOCNEXTPAGE
TABLE FILE CAR
ON TABLE SUBHEAD
"Page HEADING
"MODEL"
PRINT MODEL
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END
-RUN
-SET &CNT=&CNT+1;
-PRGLOOP
-EXIT

This message has been edited. Last edited by: <Kathryn Henning>,


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Virtuoso
posted Hide Post
Firstly, please place your code between code tags, the right hand red icon.

From the documentation:
TABLASTPAGE is supported only for a single report, not pooled or compound reports. A separate page count is generated for each report in a compound report.

So this could only be achieved by using Document Composer and that syntax, where ibi-page-number and ibi-total-pages are available.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Platinum Member
posted Hide Post
Thanks Alan.

Are there any other way we can get it?


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Guru
posted Hide Post
In your loop you will have to manage the page number.
At the start of the loop you set FOCFIRSTPAGE to 1 every time.
This can be a variable.
At the end of the loop you will set its value appropriately.

To get the total page count you will basically have to run the report twice.
First run you will add a page counter variable to the loop.
Second run you will use the page counter variable instead of TABLASTPAGE.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Platinum Member
posted Hide Post
Thanks Mighty.


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Expert
posted Hide Post
agree with Max. i would suggest that you set your LINES-PER-PAGE to some value that you are sure will fit on a page, taking into account WRAPping, number of lines taken up by your header/footer, phases of the moon, etc.
Say you have 3 reports in your output; Run each of the 3 fex bits, just generating the report data lines, with ON TABLE HOLD AS ...
Save each of the line counts.
-SET &howmany1 = &LINES ;
then divide that saved value by your lines-per-page setting (eg 60), to figure out the number of pages, and be sure to round UP. (i'm assuming you'll page-break after each output table);
Sum up all three of your final page counts, and then that number is what you put in your footing in place of
<TABLASTPAGE.

This is how i do it, anyway.

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
quote:
Reply

Thanks Susannah. That helps.


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Platinum Member
posted Hide Post
Susannah,

I tried your suggestion but the 'SET LINES' command not working proper.

-DEFAULT &&NOOFPAGE=2;

SET LINES=5;

TABLE FILE CAR
PRINT CAR
ON TABLE HOLD AS TEST
END
-RUN
-SET &LINE1=&LINES;

TABLE FILE CAR
PRINT MODEL
ON TABLE HOLD AS TEST1
END
-RUN

-SET &LINE2=&LINES;
-SET &LINE3=&LINE1 + &LINE2;
-SET &&NOOFPAGE=IF &LINE3 GT 5 THEN 2 ELSE 1;
-TYPE NOOFPAGE &&NOOFPAGE



TABLE FILE CAR
ON TABLE SUBHEAD
"Page <TABPAGENO of &&NOOFPAGE"
HEADING
"CAR"
PRINT CAR
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF OPEN NOBREAK
END
-RUN


TABLE FILE CAR
ON TABLE SUBHEAD
"Page <TABPAGENO of &&NOOFPAGE"
HEADING
"MODEL"
PRINT MODEL
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF CLOSE
END
-RUN

-EXIT


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Virtuoso
posted Hide Post
Try without the semi-column after your SET command.

quote:
SET LINES=5;


Becomes
SET LINES=5


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
I didn't have the semicolon there. It was a typo.


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report 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     [CLOSED] Page number in compound pdf report

Copyright © 1996-2020 Information Builders