I am trying to display page numbers in EXL2K format, as follows:
Cell1 Cell2 Page No: (Static value) 1 of n ('n' being total no. of pages)
Instead of '1 to n' value getting in a single cell, spans upto 3 cells, as follows:
Cell1 Cell2 Cell3 Cell4 Page No: (Static value) 1 of n ('n' being total no. of pages)
I am using HEADALIGN=BODY in this case.
I tried using HEADALIGN=NONE also, but it doesn't helps. Whole data comes in a single cell in that case.
This is the actual data I am trying to split.
"Page No: <TABPAGENO of <TABLASTPAGE"
Any help is highly appreciated. Thanks!This message has been edited. Last edited by: Prash1983,
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
January 26, 2010, 03:34 AM
Tony A
Try HEADALIGN=INTERNAL.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
January 26, 2010, 12:17 PM
Prash1983
Sorry...I missed writing about INTERNAL. I tried that also. It doesn't works.
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
January 26, 2010, 12:44 PM
rfbowley
Try this:
TABLE FILE CAR
PRINT MODEL
BY COUNTRY
FOOTING
"Page No: <TABPAGENO of <TABLASTPAGE"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=ON,
FONT='ARIAL',
SIZE=10,
COLOR='BLACK',
STYLE=NORMAL,
$
TYPE=FOOTING,
HEADALIGN=BODY,
$
ENDSTYLE
END
Robert F. Bowley Jr. Owner TaRa Solutions, LLC
In WebFOCUS since 2001
January 26, 2010, 12:49 PM
Prash1983
In generic words, I want to know about clubbing of report components. Eg: If I have three components(say, A,B & C), I want 'A' in a one cell and 'B' & 'C' clubbed in another. How can I do this?
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
January 26, 2010, 12:55 PM
Prash1983
Thanks for the reply rfbowley, but this code also is having the same problem. Result shown as follws: Cell1 Cell2 Cell3 Cell4 Page No: 1 of 1
Required O/P: Cell1 Cell2 Page No: 1 of 1
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
January 26, 2010, 01:07 PM
rfbowley
Ok, in generic terms, the HEADALIGN=BODY can be used in any 'text based' part of the report. heading, footing , sub head etc. This tells WebFocus to put the separate components into separate "cells" that align vertically withthe columns of the report.
WebFOCUS also defines a "component" as a field or a text string, with each change from string to field, or field to field or field to string starting a "new" component.
If you want to break a text string into multiple "Components", insert a "<0>" where you want the break to occur. To see this, add the following to the FOOTING in the sample above.
"this is <0> a test"
I hope this helps.
Robert F. Bowley Jr. Owner TaRa Solutions, LLC
In WebFOCUS since 2001
January 26, 2010, 01:10 PM
Dan Satchell
I think you need to make a single string out of your footing (try using a COMPUTE). Then you should be able to use HEADALIGN=BODY and COLSPAN to span your single string footing across the two columns.
WebFOCUS 7.7.05
January 26, 2010, 01:45 PM
Prash1983
Hi Dan, I already tried making a single string. Pls see the code as follows:
DEFINE FILE XXX
COUNTER/I5 WITH Col2 = COUNTER + 1 ;
DATE_RAN/A15 = DATETRAN(HDATE(HGETC(10, 'HYYMDm'), 'DMYY'),'(DMY)','(-td)','EN',15,'A15') ;
END
TABLE FILE XXX
HEADING
"Date Ran: <DATE_RAN"
BY COUNTER PAGE-BREAK NOPRINT
PRINT Col1 AS 'Col1:'
OVER Col2 AS 'Col2:'
AND COMPUTE PAGING1/A20 = TRIM('L',EDIT(TABPAGENO),5,'0',1,'A5') | ' of ' | TRIM('L',EDIT(TABLASTPAGE),5,'0',1,'A5') ; NOPRINT
ON COUNTER PAGE-BREAK
ON COUNTER SUBHEAD
"Page No: <PAGING1"
ON COUNTER SUBFOOT
""
ON TABLE SET STYLE *
TYPE=REPORT,RIGHTMARGIN=0.25, LEFTMARGIN=0.25, ORIENTATION=LANDSCAPE,
GRID=OFF,
FONT=VERDANA,
SIZE=8,
SQUEEZE=ON,
WRAP=OFF,
HEADALIGN=BODY,
TITLETEXT='XYZ',
$
TYPE= HEADING,LINE=1,OBJECT=TEXT,ITEM=1,STYLE=BOLD,JUSTIFY=LEFT,SIZE=8,COLSPAN=1,$
TYPE= HEADING,LINE=1,OBJECT=TEXT,ITEM=2,JUSTIFY=LEFT,SIZE=8,COLSPAN=1,$
TYPE=SUBHEAD, HEADALIGN=BODY, $
TYPE= SUBHEAD,BY=COUNTER,OBJECT=TEXT,JUSTIFY=LEFT,SIZE=8,COLSPAN=1,$
TYPE= SUBHEAD,BY=COUNTER,OBJECT=FIELD,JUSTIFY=LEFT,SIZE=8,COLSPAN=1,$
TYPE= SUBFOOT,LINE=1,BY=COUNTER,OBJECT=TEXT,ITEM=1,JUSTIFY=LEFT,SIZE=8,COLSPAN=2,$
TYPE= FOOTING,$
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END
TABLASTPAGE is not getting identified here. I get the result as: Cell1 Cell2 Page No: 1 of
Expecting a value for TABLASTPAGE, but doesn't works.This message has been edited. Last edited by: Prash1983,
After this, I will try and hide the third cell data.This message has been edited. Last edited by: Prash1983,
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
January 26, 2010, 05:25 PM
Prash1983
It seems like TABLASTPAGE works with COMPUTE only when it is used in HEADER/FOOTER also. Is there anyway I can use TABLASTPAGE in HEADER/FOOTER without getting it displayed in the report??
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
February 08, 2010, 07:41 PM
Prash1983
Anybody with solution for this ?
webFOCUS 7.6.x, z/OS(Mainframes), Excel and HTML
February 08, 2010, 10:32 PM
Dan Satchell
As suggested earlier in this thread, you can use HEADALIGN=NONE to put the entire footing in one big cell.
.
.
FOOTING
"Page No. <TABPAGENO of <TABLASTPAGE "
.
.
ON TABLE SET STYLE *
TYPE=FOOTING, HEADALIGN=NONE, $
ENDSTYLE
END
Or you can combine part or all of the footing, except TABLASTPAGE, into one string and use HEADALIGN=BODY to place it in one cell. As you discovered, TABLASTPAGE does not work when used in a COMPUTE. TABLASTPAGE must appear separately in the footing and will therefore appear in a separate cell. But you can left-justify TABLASTPAGE so it displays as closely as possible to the other footing text.
If none of these solutions meets your requirement, I suggest opening a case with IBI to see if there is a technique or work-around for using TABLASTPAGE in a COMPUTE.This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
February 08, 2010, 10:40 PM
Francis Mariani
You would like "Page No: 1 of n" in two Excel cells in the HEADING of a report?
Try this:
-* centord1.fex
TABLE FILE CENTORD
COUNT
ORDER_NUM
COMPUTE PAGING1/A20 = 'Page No: ' | TRIM('L',EDIT(TABPAGENO),5,'0',1,'A5') | ' of '; NOPRINT
BY PLANT NOPRINT
BY STORE_CODE
-*BY ORDER_DATE
ON PLANT SUBFOOT
" "
ON PLANT PAGE-BREAK
HEADING
"PLANT: <PLANT"
" "
"<PAGING1<TABLASTPAGE"
" "
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=HEADING, HEADALIGN=BODY, $
END
This a working example, as long as you have CENTORD Master and FOCUS DB in an App folder.
When asking a formatting question, it is a good idea to supply code we can run and modify to help you solve your problem.
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
February 08, 2010, 10:43 PM
Francis Mariani
Dan, if it's Geneva, it's 4:42, and I thought I was mad to be on FocalPoint at 22:42!
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
February 08, 2010, 10:46 PM
Dan Satchell
WebFOCUS 7.7.05
February 11, 2010, 04:21 PM
Prash1983
Thanks Dan and Francis! As of now the business asks me to focus on data issues rather than at formatting. So, I was not able to respond to your replies. Anyways, I have not been able to resolve the issue. I will keep looking into it and post the solution whenever I get one.