Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Increment a counter with every new page
Go
New
Search
Notify
Tools
Reply
  
[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,


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 225 | Location: MI | Registered: September 13, 2017Reply With QuoteReport 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: 1967 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport 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: 3119 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.