Focal Point
[SOLVED] Numbering pages by a field

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/366109842

September 24, 2009, 03:09 PM
Latigresa
[SOLVED] Numbering pages by a field
I currently have in the footer page count by Insured and the last page number. I need to have it display by insured. Say the Agent has a total of 10 pages but per insured he has 1 of 3 or 1 of 2. I need it to display that way and not 1 of 10. I have tried the repage and that works for the first number but the 10 stays the same. How do I get it to work with the repage number abd say 1 of 2? They are wanting this in the Footing Bottom. All help is greatly appreciated!!!

God Bless....

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


WEBFOCUS 7.6.4
Server: WINXP
September 24, 2009, 04:16 PM
Prarie
If you do a search on Page Numbering...you will find some examples to choose from. Good Luck
September 24, 2009, 04:24 PM
Francis Mariani
Try the REPAGE on the second SORT column "Insured" instead of the first sort column "Agent".


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
September 25, 2009, 02:47 PM
Latigresa
I did the repage and it works for the 1st number but the end page is not changing. If the Agent has 10 pages total it says 1 of 10, then 1 of 10, then, 2 of 10, then back to 1 of 10 and so forth. So the 1st number is changing just not the last one. I need it to say 1 of 1, 1 of 2, and so forth. :-(


WEBFOCUS 7.6.4
Server: WINXP
September 25, 2009, 04:28 PM
shakila25
If you use repage
Resets page number to one.

So use "Page TABPAGENO of TABLASTPAGE"


WebFOCUS 7.6.x
Windows
Output: Excel,PDF, HTML
September 26, 2009, 12:32 PM
Danny-SRL
Latigresa,

I'm afraid that there is no way to retrieve the last page of a group. The only thing I can think of is using a compound report and report on each agent separately. Frowner


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

September 27, 2009, 09:26 AM
j.gross
For those on 7.6.9, look up BYLASTPAGE in Features added in 7.6.9.


- Jack Gross
WF through 8.1.05
September 27, 2009, 11:27 AM
Doug
You may consider looping through your Agents and Insured to create separate COMPOUND reports as desired. Or, as Prarie suggested "If you do a search on Page Numbering...you will find some examples to choose from". As they say: "There's more then one way to skin the cat".




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 28, 2009, 08:44 AM
<JG>
simple multi-verb request

 

TABLE FILE CAR
SUM 
 COMPUTE PAGES/I5=CNT.CAR;  NOPRINT
BY COUNTRY
PRINT MODEL
BY COUNTRY REPAGE
BY CAR PAGE-BREAK 
FOOTING BOTTOM
" "
"PAGE <TABPAGENO of <PAGES"
" "
END 

September 28, 2009, 01:30 PM
Danny-SRL
Jack,

Again you show us that it is important to ALWAYS read the manual!!!

GHT,


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

September 29, 2009, 01:01 PM
ira
Danny: GHT?
JG: bylastpage nice feature. technique suggested - nice.


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
September 29, 2009, 01:14 PM
Danny-SRL
ira,

a little private joke with Jack.


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

September 29, 2009, 01:21 PM
Francis Mariani
GHT
September 29, 2009, 06:51 PM
j.gross
...גמר חתימה טובה
וחג שמח...

I thought it would be amusing to see how the seasons greetings emerged from some free translation services:

Babylon: ...End a good signature and happy holiday.

Google: Finished a good sign Happy Holiday

Bing: (Don't even bother)

It was.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
September 30, 2009, 02:29 PM
Latigresa
Well lst 3 posts had nothing to do with my issue but anyways...

Shakile25, I tried what you suggested but that only resets the 1st number and not the last one.


Danny, Thank you for letting me know it can't be done.

JG, I tried your suggestion but nada... Frowner

Thanks for all the helpful suggestion even though what i need can't be done. We are not upgrading to 7.6.9 yet so I don't have that feature yet.


WEBFOCUS 7.6.4
Server: WINXP
September 30, 2009, 03:01 PM
Danny-SRL
Latigresa,

How many "Insureds" do you have? Also, what type of file are you reporting from? Could it be that the "Insured" is an index in the file?

If there are not too many Insureds and there is an index then the following can give you a workaround [it needs to be beautified a bit].

  
-* File LaTigresa.fex
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
BY COUNTRY
ON TABLE SAVE
END
-RUN
-SET &MAX=&LINES;
-REPEAT #LOOP FOR &I FROM 1 TO &MAX;
-READ SAVE &COUNTRY.A10.
TABLE FILE CAR
WHERE COUNTRY EQ '&COUNTRY'
PRINT SALES
BY CAR PAGE-BREAK
BY MODEL
BY BODYTYPE
HEADING
"Sales Report for &COUNTRY and <CAR"
FOOTING
"Page <TABPAGENO of <TABLASTPAGE"
ON TABLE HOLD AS H&I FORMAT HTMTABLE
END
-#LOOP
-HTMLFORM BEGIN
<html>
<body>
<br>
-REPEAT #SHOW FOR &I FROM 1 TO &MAX;
!IBI.FIL.H&I;
<br>
-#SHOW
</body>
</html>
-HTMLFORM END



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

September 30, 2009, 03:49 PM
Latigresa
Thanks Danny...I will try this!!! :-)


WEBFOCUS 7.6.4
Server: WINXP
September 30, 2009, 03:56 PM
Francis Mariani
Another possibility:

TABLE FILE CENTORD
SUM
COMPUTE ORD_COUNT/D4 = CNT.ORDER_DATE; NOPRINT
BY STORE_CODE
BY PROD_NUM

PRINT
COMPUTE PROD_PAGE/D4 = ( ORD_COUNT / 56 ) + 1; NOPRINT
QUANTITY
BY STORE_CODE
BY PROD_NUM
BY ORDER_DATE

ON PROD_NUM PAGE-BREAK REPAGE

WHERE STORE_CODE IN ('1003CA', '1003CO','1003CT','1003DC');
WHERE PROD_NUM IN ('1004', '1006','1008','1036');

FOOTING BOTTOM
"<TABPAGENO OF <PROD_PAGE  (Total <TABLASTPAGE|)"

ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLE *
TYPE=REPORT, LEFTGAP=0.04, RIGHTGAP=0.04, $
ENDSTYLE
END

You may have to tweak the "56" in the code, depending on how many data rows are displayed, font size, heading lines, etc. The example works.


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
October 01, 2009, 10:26 AM
Latigresa
Francis,

Thanks!!! That worked...I just need to tweak the 56 like you said!!! Thank you so much. Big Grin

Danny,

I wasn't able to get your code to work with mine. It kept creating hundreds of HTM files. I must have done something wrong. Frowner But I'm going to keep your code in mind for future use in case I needed it. Smiler


Thanks Everyone!!!
God Bless...

Ana


WEBFOCUS 7.6.4
Server: WINXP
October 01, 2009, 02:42 PM
Danny-SRL
Ana,

If you were creating "hundreds" of HTML files, then probably you have an infinite loop somewhere.

If Francis's solution works for you, go for it!


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