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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Increment a counter with every new page

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Increment a counter with every new page
 Login/Join
 
Platinum Member
posted
Hi All,

I have this requirement in a PDF report,where i want to increment a counter value by 1 whenever the report overflows to next page(or TABPAGENO increments).
I am looking at TABPAGENO and trying to increment my counter variable.I tried using WITH as shown below.
 COMPUTE COUNTER_VAL/I1 WITH TABPAGENO = &COUNTER_VAR +1; 


As per my understanding with every change in value for TABPAGENo the counter value is incremented by using WITH.
It is not working as of now.
Is there any other alternative solution.?

This message has been edited. Last edited by: FP Mod Chuck,


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
Maybe this:
  
-DEFAULTH &CTR=17
TABLE FILE CAR
PRINT
     CAR.CARREC.MODEL
     COMPUTE CVAL/I5 = &CTR + TABPAGENO;
BY  CAR.ORIGIN.COUNTRY NOPRINT
BY  CAR.COMP.CAR

ON CAR.ORIGIN.COUNTRY PAGE-BREAK
HEADING
"<CAR.ORIGIN.COUNTRY  "
ON TABLE SET PAGE-NUM OFF
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = warm,
$
ENDSTYLE
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Try this:
COMPUTE COUNTER_VAL/I5 = IF &TABPAGENO NE LAST &TABPAGENO THEN &COUNTER_VAR +1 ELSE &COUNTER_VAR;

I changed your "I1" to "I5" just in case the value of &COUNTER_VAR is GT 9.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 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     [CLOSED] Increment a counter with every new page

Copyright © 1996-2020 Information Builders