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] Styling last line of a report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Styling last line of a report
 Login/Join
 
Virtuoso
posted
I have a PDF report where rows are subdivided in sections. Every section needs a border around it, with some white-space between each section.

I'm almost there! I got the borders at bottoms and tops of sections just fine, except for the last section by applying a style to the SUBHEAD, like so:
TYPE=SUBHEAD,
	BORDER-TOP=LIGHT,
	BORDER-BOTTOM=LIGHT,
$


The table doesn't have subtotals or grand totals, so I can't add a top-border to one of those to close the borders around my last section by adding a bottom border to it. Or more accurately, I'd add a top border to a next (empty) row.

I could try a trick; By comparing a section's row-count to row numbers per section it's possible to determine that a row is the last row in the section, but I'm not quite sure how to go about the row counts and it seems a rather convoluted approach (the report used to use a simpler version of such a trick though).

What I mean is this: If I'd have for example:
NR  TITLE     ROWCOUNT  SECTION
 1  Item A     5         1
 2  Item B     5
 3  Item C     5
 4  Item D     5
 5  Item E     5
 1  Item X     3         2
 2  Item Y     3
 3  Item Z     3


Then I could apply:
TYPE=DATA, COLUMN=N1, WHEN=N1 EQ N3, BORDER-BOTTOM=LIGHT,$
TYPE=DATA, COLUMN=N2, WHEN=N1 EQ N3, BORDER-BOTTOM=LIGHT,$
TYPE=DATA, COLUMN=N3, WHEN=N1 EQ N3, BORDER-BOTTOM=LIGHT,$
TYPE=DATA, COLUMN=N4, WHEN=N1 EQ N3, BORDER-BOTTOM=LIGHT,$


But then how would I get the row counts per section before actually fetching the rows?

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
How about creating a simple fex reading one of the sample tables to illustrate what you want to accomplish?


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
Well, what I want is pretty easy to visualize and I'm not familiar with the sample tables (if we even have those...). Using the data as described in my above post, the output I get is this:
  __________
 | TITLE    |
 +----------+
  __________
 | Item A   |
 | Item B   |
 | Item C   |
 | Item D   |
 | Item E   |
 +----------+
  __________
 | Item X   |
 | Item Y   |
 | Item Z   |

...footing text starts here...


As you can see, the items are grouped together per section.

The line with ___'s is the top border of each section, the line with ---'s is the bottom border. I cheated a little, as both these borders are actually applied as a style to SUBHEAD, and not to the first and last row (respectively) of DATA-items in every section.

Unfortunately, the bottom border of the last section (section 2) is missing, as there's no SUBHEAD after the last row. The end of the report should look like this:
  __________
 | Item X   |
 | Item Y   |
 | Item Z   |
 +----------+ (This border is the one I want to add)

...footing text starts here...



WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
If you have a footing, have you tried applying border-top to it?


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
This typically happens when there is a subfoot or something else like, from memory, a skipline.

It can also happen when the "section" is split across pages.

You can try Francis' suggestion.

You could also try using NOSPLIT to keep the seciton together, if its not too long.

IF you are able to create a demo of the error it will greatly help, as we can only see your representation.

The sample files are in an app folder called IBISAMP.

You can create your own on the fly as well, this has been shown many times in the forum, I typically use EDAPUT to write sample data, you could search for that.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Francis Mariani:
If you have a footing, have you tried applying border-top to it?


Yes, I have, but there is space between the last section line and the footer.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Waz:
This typically happens when there is a subfoot or something else like, from memory, a skipline.


I tried adding a SUBFOOT, but that way the lines at the bottom of the SUBHEAD and at the top of SUBFOOT only get printed if those items contain any data - whitespace isn't sufficient, then I get no border-lines again.

I get lines with:
TABLE FILE ...
SUM A B C
BY D
ON NAME SUBHEAD
"."
ON NAME SUBFOOT
"."
ON NAME NOSPLIT
...
TYPE=SUBHEAD,
    BORDER-BOTTOM=LIGHT,
$
TYPE=SUBFOOT,
    BORDER-TOP=LIGHT,
$


But not with (notice I replaced the dots with spaces):
ON NAME SUBHEAD
" "
ON NAME SUBFOOT
" "
ON NAME NOSPLIT


As odd as that is, I'd rather not even get the extra empty line from adding a SUBFOOT. The empty line from SUBHEAD is enough space between the sections. As said before, I can almost get it to do what I want by applying both a TOP and a BOTTOM border to the SUBHEAD (or the SUBFOOT, for that matter), but if I do that I won't get a line under the last row (or above the first row if I use SUBFOOT instead).

quote:

IF you are able to create a demo of the error it will greatly help, as we can only see your representation.

The sample files are in an app folder called IBISAMP.

You can create your own on the fly as well, this has been shown many times in the forum, I typically use EDAPUT to write sample data, you could search for that.


We don't have IBISAMP installed, so I can't help you with that. Stuff like EDAPUT is a bit beyond my grasp yet, I'm afraid. The help isn't useful there either (no surprise there), EDAPUT is not listed in the index...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
I solved it!

I added a BORDER-TOP to the SUBFOOT and ditched the SUBHEAD.
With that I only needed to detect the first row of a section, which is infinitely easier than the last row (no need to keep counts or things like that).

This is the trick (with N6 being my NAME column and N15 the computed column below:
	 COMPUTE LASTNAME/A80 = LAST NAME; NOPRINT
...

DEFMACRO=COND_NEXT,
	MACTYPE=RULE,
	WHEN=N6 NE N15,
$
TYPE=DATA,
	BORDER-TOP=LIGHT,
	MACRO=COND_NEXT,
$


Basically, if the NAME from the last line doesn't match the NAME of this line, then this is the first line of a new section and we need to draw a BORDER-TOP at this row.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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] Styling last line of a report

Copyright © 1996-2020 Information Builders