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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Alternating headers
 Login/Join
 
Silver Member
posted
Is there a way to print different headers on even and odd pages? I don't just want the formatting to be different, I want the text and positioning to be different. For example on odd pages I want the page number followed by the title and I want it to be left-aligned; on even pages I want the title followed by the page number and I want it to be right-aligned.


WebFOCUS 7.7.05
Windows 2008
 
Posts: 39 | Registered: March 02, 2005Report This Post
Platinum Member
posted Hide Post
Hi Leo,

you could try something like :
  
TABLE FILE CAR
PRINT CAR
COMPUTE PAGENO/I1	 = IMOD(TABPAGENO, 2, PAGENO) ;  NOPRINT
BY COUNTRY PAGE-BREAK
HEADING
" Testing  : page <TABPAGENO "
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=HEADING,
     GRID=OFF,
     SIZE=9,
     BOTTOMGAP=0,
     JUSTIFY=LEFT,
     TOPGAP=0,
     BACKCOLOR='NONE',
     COLOR='BLACK',
     STYLE='BOLD',
WHEN=PAGENO EQ 1,
$

TYPE=HEADING,
     GRID=OFF,
     SIZE=9,
     BOTTOMGAP=0,
     JUSTIFY=RIGHT,
     TOPGAP=0,
     BACKCOLOR='NONE',
     COLOR='BLACK',
     STYLE='BOLD',
WHEN=PAGENO EQ 0,
$

ENDSTYLE
END



Hope it helps ,

P.

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


D: WF 7.6.2 P. : WF 7.6.2 on W2003
------------------------------------------------------------------
I see myself as an intelligent, sensitive human, with the soul of a clown which forces me to blow it at the most important moments.

-Jim Morrison-

 
Posts: 206 | Registered: February 25, 2005Report This Post
Expert
posted Hide Post
Nice solution Pete, adding BY COUNTRY shows the full effect!

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
Platinum Member
posted Hide Post
You are quite right , so i edited my code

P.


D: WF 7.6.2 P. : WF 7.6.2 on W2003
------------------------------------------------------------------
I see myself as an intelligent, sensitive human, with the soul of a clown which forces me to blow it at the most important moments.

-Jim Morrison-

 
Posts: 206 | Registered: February 25, 2005Report This Post
Silver Member
posted Hide Post
This works for the alternate positioning but not the alternate header.
I would like the even header to be "page TABPAGENO Testing"
but would like the odd header to be "Testing: page TABPAGENO".

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


WebFOCUS 7.7.05
Windows 2008
 
Posts: 39 | Registered: March 02, 2005Report This Post
Expert
posted Hide Post
Not easy to achieve using field names (to include TABPAGENO) or necessarily elegent, but you could try this as your header text -

HEADING
"page <TABPAGENO Testing  : <+0 page <TABPAGENO "


then follow it up with styling such as -

TYPE=HEADING, ITEM=1, COLOR=WHITE, WHEN=PAGENO EQ 0, $
TYPE=HEADING, ITEM=2, COLOR=WHITE, WHEN=PAGENO EQ 0, $
TYPE=HEADING, ITEM=4, COLOR=WHITE, WHEN=PAGENO EQ 1, $
TYPE=HEADING, ITEM=5, COLOR=WHITE, WHEN=PAGENO EQ 1, $


Not elegant, but it will achieve what you want. Change the COLOR to your backcolor value.

T

Edited to clarify the easy statement.

This message has been edited. Last edited by: Tony A,



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
Expert
posted Hide Post
Yes Tom,

Not completely impossible but it depends on how elegant a solution you want.

You could goto the extent of using -
COMPUTE PAGE_NUM/I2 = IF COUNTRY NE LAST COUNTRY THEN LAST PAGE_NUM + 1 ELSE LAST PAGE_NUM; NOPRINT
COMPUTE HEAD_TEXT/A80 = IF PAGENO EQ 1 THEN 'Page: '|EDIT(PAGE_NUM)|' - Left hand Heading'
                                       ELSE 'Right hand Heading - Page: '|EDIT(PAGE_NUM); NOPRINT
BY COUNTRY PAGE-BREAK
HEADING
"<HEAD_TEXT"


but you ought to check just how many records you are pulling out, the additional processing overheads etc.

But for a small example such as this, many solutions are possible.

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
Expert
posted Hide Post
That sounds like a song title!
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Rather than limited work-arounds, I'd like to see IBI emerge from the fan-fold-paper mindset and provide native support for two sided-printing. Things like:

- separate HEADING and FOOTING content for odd and even pages, as discussed in this thread.

- "ON sort-field PAGE-BREAK" syntax option to insure every section starts on an odd page.

- content ("this page intentionally ...") for the skipped pages.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Member
posted Hide Post
Hi Pete,
Thanx a ton for your effort.I'll try this today & let you know the result.
 
Posts: 10 | Registered: July 19, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders