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     [SOLVED] Subhead and HEADING positions

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Subhead and HEADING positions
 Login/Join
 
Platinum Member
posted
Is there anyway to display the contents of HEADING above SUBHEAD.

Taking the below code as example, i want "HEADING-1" to be printed in all pages and "HEADING-2" only in the first page. Most importantly, "HEADING-1" should be above "HEADING-2" on the 1st page.

TABLE FILE CAR
BY COUNTRY PAGE-BREAK
ON TABLE SUBHEAD
"HEADING-1"
HEADING
"HEADING-2"
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END

The parameter PRINTPLUS can be used to print Report SUBFOOT above the footing instead of below. Do we have anything similar for HEADING and SUBHEAD?

-Hari
WF-769

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


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Expert
posted Hide Post
Let's clarify these headings first!

Headings appearing on all pages are called "page headings" and are created by
HEADING

Headings appearing on the first page only are called "report headings" and are created by
ON TABLE SUBHEAD


The report heading appears before the first page - you cannot change the position of this.

If you insist on having a heading appear once in the report, and below the page heading, you can trick the program into this, unfortunately this fake report heading appears below the column headings:
DEFINE FILE CAR
DUMMY1/A1 = '';
END

TABLE FILE CAR
BY DUMMY NOPRINT
BY COUNTRY PAGE-BREAK

ON DUMMY SUBHEAD
"FAKE REPORT HEADING"

HEADING
"PAGE HEADING"
ON TABLE SET PAGE-NUM OFF
-*ON TABLE PCHOLD FORMAT PDF
END

Or you could try this, though you get a blank line for each subsequent page after the first one:
TABLE FILE CAR
PRINT 
COUNTRY NOPRINT
COMPUTE FAKE_REPORT_HEADING/A20 = IF FAKE_REPORT_HEADING EQ '' THEN 'FAKE REPORT HEADING' ELSE BYTVAL('','A3'); NOPRINT

BY COUNTRY PAGE-BREAK

HEADING
"PAGE HEADING"
"<FAKE_REPORT_HEADING"

ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
END

The ELSE requires a non-blank character that's also non-printable, I can't come up with anything other than BYTVAL('','A3').

Alright, I've worked too long on this, now it's up to you...


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
This might work:

TABLE FILE CAR
 SUM
 COMPUTE HEAD1/A15 = IF TABPAGENO EQ 1 THEN 'HEADING-1' ELSE ' '; NOPRINT
 COMPUTE HEAD2/A15 = IF TABPAGENO EQ 1 THEN 'HEADING-2' ELSE 'HEADING-1'; NOPRINT
 BY COUNTRY PAGE-BREAK
 HEADING
  "<HEAD1"
  "<HEAD2"
 ON TABLE SET PAGE-NUM OFF
 ON TABLE PCHOLD FORMAT PDF
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
Dan, that's pretty good code.


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
Thank you Francis for the compliment. Given enough tries, sometimes I get lucky.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
quote:
Or you could try this, though you get a blank line for each subsequent page after the first one


Would this technique help? It gives you both lines in Page 1 and only the first line in any subsequent page without the empty line:

TABLE FILE CAR
PRINT
        CAR
		MODEL
COMPUTE HDLINE/A60 = IF TABPAGENO EQ 1 THEN 'HEADING-1^HEADING-2' ELSE 'HEADING-1'; NOPRINT
COMPUTE HDPRTLINE/A60 = CTRAN(60, HDLINE, 94, 13, 'A60'); NOPRINT
BY COUNTRY PAGE-BREAK
HEADING
"<HDPRTLINE"
"PAGE: <TABPAGENO"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, LINEBREAK='CR', $
ENDSTYLE
END


Technique borrowed from: Embedding Line Breaks in Character Strings

- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Of course, this only works for PDF and probably WP, DOC and other character-based output formats but I think PDF is the specific output you're targeting, right Hari?



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Oh well, the document says it all:
quote:
This technique can only be used with PDF and PostScript reports.


Hopefully it'll be sufficient.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Dan's code is something that we use extensively when there is something the we want to only include on the first page of a report. For example, the invoices we generate have a payment coupon that we only want to show up on page 1. also we have a "blank" image that we sometimes locate over the "Page 1" page numbering when we don't want it to appear on page 1. (Basically it gets hidden behind the white box.)

Using this technique, objects/text can appear anywhere on the first page - not just as a heading - but it allows you to overcome the limitation of the Report Heading location. Due to some inconsistencies in the way that page-numbering (and TABPAGENO) calculate, I wouldn't go much further than Page 1.

This message has been edited. Last edited by: Darin Lee,


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
quote:
Due to some inconssistencies ion the way that page-numbering (and TABPAGENO) calculate, I wouldn't go much further than Page 1


When playing with the code, I had initially created a SUBTOTAL on COUNTRY (with the default TABLE TOTAL) and I noticed that TABPAGENO provided a consistent value only for the first 5 pages but it seemed to have a MISSING value in Page 6. I then decided to "keep it simple" and removed the SUBTOTAL and the page number was "fixed".

Considering that weird behaviour, I totally agree with Darin in referring to TABPAGENO only for the first page as you'll never know what may happen after that.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Thanks Francis, Dan and Neftali. All your approaches were great. I appreciate that.

My format is only PDF. BTW, i also found another technique using STYLESHEETS,

TYPE=HEADING,LINE=2,COLOR=WHITE,WHEN=TABPAGENO GT 1,$

-Hari


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Expert
posted Hide Post
If you want to make the line almost completely invisible, add SIZE=1 to TYPE=HEADING, LINE=2


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     [SOLVED] Subhead and HEADING positions

Copyright © 1996-2020 Information Builders