Focal Point
page numbering alignment

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

March 09, 2007, 12:55 AM
Aditya
page numbering alignment
Hi,

I am page numbering the reports as follows-

FOOTING BOTTOM
"____________________________________<0X
_____________________________________<0X
_____________________________________<0X
______________________________"
"Run Date:  &DATEMDYYYY  &TOD2 <+0>XXXXXXXXXXXX <0X
XXXXXXXXXXXXXX XXXXXX<+0>Report No: &REPORTNO <0X
<+0>Page:<+0><TABPAGENO<+0>of<+0><TABLASTPAGE"

ON TABLE SET STYLE *
TYPE = FOOTING,LINE=1,ITEM=1,JUSTIFY=CENTER,COLSPAN=10,$
TYPE = FOOTING,LINE=2,ITEM=1,WIDTH=2,JUSTIFY=LEFT,$
TYPE = FOOTING,LINE=2,ITEM=2,WIDTH=4.5,STYLE=BOLD+ITALIC,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=3,WIDTH=2.5,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=4,WIDTH=0.5,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=5,WIDTH=0.2,JUSTIFY=CENTER,$
TYPE = FOOTING,LINE=2,ITEM=6,WIDTH=0.1,JUSTIFY=CENTER,$
TYPE = FOOTING,LINE=2,ITEM=7,WIDTH=0.2,JUSTIFY=CENTER,$
ENDSTYLE


Now the problem is - in my page: x of y that appears on the report footer , whenever x is single/double digit it looks atleast fine but when it becomes more than 2 digits the spacing between each of 'Page' 'x' 'of' 'y' gets reduced and they look like the following-

page700of700.

I want a single space between each of the 'page:' 'x' 'of' and 'y' irrespective of the no. of digits in x and y.How do i do it.I am using WIDTH to position the footers.

Regards,
Aditya
March 09, 2007, 01:41 AM
Danny-SRL
Aditya,
Did you put a space after "Page:" and after "of"?


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

March 09, 2007, 01:54 AM
Aditya
Hi Danny,
There is no space for any element.

Regards,
Aditya
March 09, 2007, 02:35 AM
Alan B
Aditya

Danny is right. I think you are making work for yourself here. Try letting the elements find their own position:
  
FOOTING BOTTOM
"____________________________________<0X
_____________________________________<0X
_____________________________________<0X
______________________________"
"Run Date:  &DATEMDYYYY  &TOD2 <+0>XXXXXXXXXXXX <0X
XXXXXXXXXXXXXX XXXXXX<+0>Report No: &REPORTNO <0X
<+0>Page: <TABPAGENO of <TABLASTPAGE"

ON TABLE SET STYLE *
TYPE = FOOTING,LINE=1,ITEM=1,JUSTIFY=CENTER,COLSPAN=10,$
TYPE = FOOTING,LINE=2,ITEM=1,WIDTH=2,JUSTIFY=LEFT,$
TYPE = FOOTING,LINE=2,ITEM=2,WIDTH=4.5,STYLE=BOLD+ITALIC,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=3,WIDTH=2.5,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=4,WIDTH=0.5,JUSTIFY=RIGHT,$
ENDSTYLE



Alan.
WF 7.705/8.007
March 09, 2007, 02:53 AM
Aditya
Hi Alan,

I was doing the same thing earlier.But the problem is i get no space between 'page:' and 'x'.So the numbering looks like this-

Page:1 of 1151

How do i get a space between 'page:' and '1'.

Regards,
Adit
March 09, 2007, 03:03 AM
Aditya
Hi,
Also wanted to know if there is any way i can display the numbering with commas like this-
'Page: 1,234 of 4,567' 


Regards,
Aditya
March 09, 2007, 03:03 AM
Alan B
If you want to ensure a space use the HTML no break space as follows:
  
FOOTING BOTTOM
"____________________________________<0X
_____________________________________<0X
_____________________________________<0X
______________________________"
"Run Date:  &DATEMDYYYY  &TOD2 <+0>XXXXXXXXXXXX <0X
XXXXXXXXXXXXXX XXXXXX<+0>Report No: &REPORTNO <0X
<+0>Page:&|nbsp;<TABPAGENO of <TABLASTPAGE"

ON TABLE SET STYLE *
TYPE = FOOTING,LINE=1,ITEM=1,JUSTIFY=CENTER,COLSPAN=10,$
TYPE = FOOTING,LINE=2,ITEM=1,WIDTH=2,JUSTIFY=LEFT,$
TYPE = FOOTING,LINE=2,ITEM=2,WIDTH=4.5,STYLE=BOLD+ITALIC,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=3,WIDTH=2.5,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=4,WIDTH=0.5,JUSTIFY=RIGHT,$
ENDSTYLE

This should enforce a space wherever you want it. Make sure you use it in the form &|nbsp; so as WF doesn't think its an &var, it must have a semi-colon at the end.


Alan.
WF 7.705/8.007
March 09, 2007, 03:22 AM
Aditya
I get the following error-
 0 ERROR AT OR NEAR LINE     48  IN PROCEDURE SQLOUT  FOCEXEC *
 (FOC295) A VALUE IS MISSING FOR: '& n b s p'

March 09, 2007, 03:41 AM
Alan B
You must use in the form &|nbsp;
That is an & followed by a concat symbol, |, followed by nbsp;


Alan.
WF 7.705/8.007
March 09, 2007, 04:10 AM
Aditya
Hi Alan,

I have used exactly the same thing.
<+0>Page:&|nbsp;<TABPAGENO of <TABLASTPAGE"


I dont know why its giving an error.

Regards,
Aditya
March 09, 2007, 04:18 AM
Aditya
Hi Alan,

I used the double concat || and its working now.

Thanks for your help.

Regards,
Aditya
March 09, 2007, 04:27 AM
Alan B
Glad the nbsp is working, though not sure why you need double concat!
To get commas in your page number add a compute to your program:
COMPUTE NEWP/D8=TABPAGENO; NOPRINT

Use NEWP in place of TABPAGENO, the D format gives it the commas.


Alan.
WF 7.705/8.007
March 09, 2007, 05:05 AM
Aditya
Hi Alan,
Its working for TABPAGENO.I tried the same thing for TABLASTPAGE but it is not working.

Is there any way to make it work.
Regrds,
Adity
March 09, 2007, 05:39 AM
Alan B
That's an intersting one. TABLASTPAGE is not available in the report unless it is referenced in a HEADING/FOOTING. So you would have to kluge it:
  
.
.
COMPUTE NEWT/D9=TABLASTPAGE; NOPRINT
COMPUTE NEWP/D9=TABPAGENO; NOPRINT
.
.
FOOTING BOTTOM
"____________________________________<0X
_____________________________________<0X
_____________________________________<0X
______________________________"
"Run Date:  &DATEMDYYYY  &TOD2 <+0>XXXXXXXXXXXX <0X
XXXXXXXXXXXXXX XXXXXX<+0>Report No: &REPORTNO <0X
<+0>Page:&|nbsp;<NEWP of <NEWT <TABLASTPAGE"

ON TABLE SET STYLE *
TYPE = FOOTING,LINE=1,ITEM=1,JUSTIFY=CENTER,COLSPAN=10,$
TYPE = FOOTING,LINE=2,ITEM=1,WIDTH=2,JUSTIFY=LEFT,$
TYPE = FOOTING,LINE=2,ITEM=2,WIDTH=4.5,STYLE=BOLD+ITALIC,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=3,WIDTH=2.5,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=4,WIDTH=0.5,JUSTIFY=RIGHT,$
TYPE = FOOTING,LINE=2,ITEM=9,COLOR=WHITE,$
ENDSTYLE

Not sure what the item number will be, but try different values.

Not very clean, anyone know another way?


Alan.
WF 7.705/8.007
March 09, 2007, 06:01 AM
Aditya
Hi Alan,

It gives a zero value.I have decided to keep it plain without any commas.

Thanks very much for your help.

Regards,
Aditya
March 09, 2007, 10:08 AM
Alan B
Aditya

If the result gives a zero it is because you are not referencing the field TABLASTPAGE in the footing. You must reference it in the footing for it to be available in the TABLE request for the compute, just as I showed in the example.
The kluge is to hide the field LASTTABPAGE in the footing so it doesn't show.


Alan.
WF 7.705/8.007