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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]heading format.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]heading format.
 Login/Join
 
Gold member
posted
Hi,

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
 
Posts: 51 | Registered: August 31, 2009Report This Post
Expert
posted Hide Post
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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Sorry...I missed writing about INTERNAL. I tried that also. It doesn't works.


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: August 31, 2009Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: August 31, 2009Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005Report This Post
Virtuoso
posted Hide Post
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
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
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,


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Virtuoso
posted Hide Post
Try this:

.
.
COMPUTE PAGING1/A20 = 'Page No. ' | TRIM('L',EDIT(TABPAGENO),5,'0',1,'A5') | ' of'; NOPRINT
.
.
ON COUNTER SUBHEAD
   "<PAGING1 <TABLASTPAGE "
.
.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
Did this too!! Frowner
But, then it becomes a different component and gets displayed in the next column.
Now I am trying this:

TABLE  FILE XXX 
.
.
.
   COMPUTE PAGING1/A20 = TRIM('L',EDIT(TABPAGENO),5,'0',1,'A5') | ' of ' | TRIM('L',EDIT(TABLASTPAGE),5,'0',1,'A5') ; NOPRINT
.
.
.
   ON COUNTER SUBHEAD
   "Page No: <PAGING1<TABLASTPAGE"
.
.
.
.
 END  

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
 
Posts: 51 | Registered: August 31, 2009Report This Post
Gold member
posted Hide Post
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
 
Posts: 51 | Registered: August 31, 2009Report This Post
Gold member
posted Hide Post
Anybody with solution for this ?


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report This Post
Virtuoso
posted Hide Post
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.

.
.
COMPUTE PAGETEXT/A20 = 'Page No. ' | TRIM('L',EDIT(TABPAGENO),5,'0',1,'A5') | ' of'; NOPRINT
.
.
FOOTING
"<PAGETEXT<TABLASTPAGE "
.
.
ON TABLE SET STYLE *
TYPE=FOOTING, HEADALIGN=BODY, $
TYPE=FOOTING, OBJECT=FIELD, ITEM=2, JUSTIFY=LEFT, $
ENDSTYLE
END


Or..

.
.
COMPUTE PAGETEXT/A15 = TRIM('L',EDIT(TABPAGENO),5,'0',1,'A5') | ' of'; NOPRINT
.
.
FOOTING
"Page No.<PAGETEXT<TABLASTPAGE "
.
.
ON TABLE SET STYLE *
TYPE=FOOTING, HEADALIGN=BODY, $
TYPE=FOOTING, OBJECT=FIELD, ITEM=1, JUSTIFY=RIGHT, $
TYPE=FOOTING, OBJECT=FIELD, ITEM=2, JUSTIFY=LEFT, $
ENDSTYLE
END



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
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Eeker


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
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.

Thanks a lot for all your help!!


webFOCUS 7.6.x,
z/OS(Mainframes),
Excel and HTML
 
Posts: 51 | Registered: August 31, 2009Report 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]heading format.

Copyright © 1996-2020 Information Builders