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] Subhead issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Subhead issue
 Login/Join
 
Member
posted
Hi,

subhead repeats twice at few pages. Can anyone let me know the fix for the same. (Something wrong with my WHEN condition on subheads)

TABLE FILE GGSALES
PRINT STCD AS '' DOLLARS AS ''
AND COMPUTE ROWCNT/I9 = LAST ROWCNT + 1; NOPRINT
BY CATEGORY NOPRINT
BY STCD NOPRINT
BY TOTAL ROWCNT NOPRINT
WHERE STCD IN ('R1109','R1044')
HEADING
"HEADING"

ON TABLE SUBHEAD
"TABLE SUBHEADING"

ON ROWCNT SUBHEAD
""Red STORE"
WHEN (STCD NE LAST STCD OR TABPAGENO NE LAST TABPAGENO) AND STCD EQ 'R1109';


ON ROWCNT SUBHEAD
""Green STORE"
WHEN (STCD NE LAST STCD OR TABPAGENO NE LAST TABPAGENO) AND STCD EQ 'R1044';


ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE=LEGAL,
ORIENTATION=LANDSCAPE,
SIZE=8,
FONT=ARIAL,
BOTTOMMARGIN=0,
TOPMARGIN=0,
LEFTMARGIN=0.30,
GRID=ON,
SQUEEZE=ON,
$


TYPE=SUBHEAD,JUSTIFY=RIGHT,SIZE=15,WIDTH=2.50, WRAP=2.50,BACKCOLOR=RED, WHEN = STCD EQ 'R1109',$
TYPE=SUBHEAD,JUSTIFY=RIGHT,SIZE=15,WIDTH=2.50, WRAP=2.50,BACKCOLOR=GREEN, WHEN = STCD EQ 'R1044',$

TYPE=HEADING,SIZE=6,STYLE=BOLD,FONT=ARIAL,HEADALIGN=BODY,BORDER=OFF,$
TYPE=REPORT,LINEBREAK='CR',$
TYPE=REPORT,
GRID=ON,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',

ENDSTYLE
END
-EXIT



Thanks,
Yash

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 11 | Registered: September 01, 2015Report This Post
Expert
posted Hide Post
Read this: Any explanation ( strange behaviour ) ?!?. I would do further searches for LAST TABPAGENO.

TABPAGENO is a special field and it appears LAST TABPAGENO is always zero, so you may not be able to use that syntax.

This might illustrate the issue:

TABLE FILE GGSALES
PRINT 
STCD AS '' DOLLARS AS ''
COMPUTE ROWCNT/I9 = LAST ROWCNT + 1; 
TABPAGENO
COMPUTE LAST_TABPAGENO/I9 = LAST TABPAGENO;
BY CATEGORY 
BY STCD 
BY TOTAL ROWCNT 
WHERE STCD IN ('R1109','R1044')
HEADING
"HEADING"

ON TABLE SUBHEAD
"TABLE SUBHEADING"

ON ROWCNT SUBHEAD
" "
"RED STORE"
WHEN (STCD NE LAST STCD OR TABPAGENO NE LAST TABPAGENO) AND STCD EQ 'R1109';

ON ROWCNT SUBHEAD
" "
"GREEN STORE"
WHEN (STCD NE LAST STCD OR TABPAGENO NE LAST TABPAGENO) AND STCD EQ 'R1044';

ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,
UNITS=IN, PAGESIZE=LEGAL, ORIENTATION=LANDSCAPE, SIZE=8, FONT=ARIAL, BOTTOMMARGIN=0.30, TOPMARGIN=0, LEFTMARGIN=0.30, SQUEEZE=ON,$

TYPE=SUBHEAD,JUSTIFY=RIGHT,SIZE=15,WIDTH=2.50, WRAP=2.50,BACKCOLOR=RED, WHEN = STCD EQ 'R1109',$
TYPE=SUBHEAD,JUSTIFY=RIGHT,SIZE=15,WIDTH=2.50, WRAP=2.50,BACKCOLOR=GREEN, WHEN = STCD EQ 'R1044',$

TYPE=HEADING,SIZE=6,STYLE=BOLD,FONT=ARIAL,HEADALIGN=BODY,BORDER=OFF,$
TYPE=REPORT,LINEBREAK='CR',$
TYPE=REPORT,
GRID=ON,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',

ENDSTYLE
END

Meanwhile: you posted your code without
[code]
[/code]
tags, so it's possible that some of your code got slightly mangled - particularly the SUBHEAD - I imagine each subhead has two lines - one blank and one with text.

A possible solution to your problem might be to add some bottom margin (BOTTOMMARGIN=0.30) because I think you're getting the first duplicate heading because of overflow and the second because of your ON statement. Adding the .3 bottom margin seems to eliminate the first duplicate.

In the past, when I worked with PDF output, I could control the number of lines per page with SET LINES=30, but this does not seem to work any more. Then, I've also seen LINES-PER-PAGE in the stylesheet, but I think this is/was for Active HTML. Nevertheless, I think your problem is because of overflow...


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
  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] Subhead issue

Copyright © 1996-2020 Information Builders