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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional Footing

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

Is there any way to show the footer conditionally based on the data in data page.


Ex:
Page:1

X Y Z
1 2 3
4 5 6
1 1 1

Page:2

X Y Z
1 1 1
1 1 1
1 1 1

Here I need to show footing only for the pages to which if any value on column Z is 6 so i need to show the footer on page 1 alone.

Thanks in advance.

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


WebFOCUS 764
Unix
Excel, HTML, PDF
 
Posts: 5 | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
You can probably use the behaviour of FOC_NONE to hide the footer until there's an applicable value for Z in your data. Something like this:
DEFINE FILE CAR
SHOWFOOT/I1 = IF CAR EQ 'JAGUAR' THEN 1 ELSE FOC_NONE;
END
TABLE FILE CAR
PRINT *
ON TABLE FOOTING
"<MAX.SHOWFOOT Line 1"
"<MAX.SHOWFOOT Line 2"
"etc."
END


Haven't tried this though.


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
Platinum Member
posted Hide Post
Hi Wep, your example won't work. FOC_NONE is designed to hide any non-Dialogue Manager line it appears on when it appears as the value in an amper variable.

It will NOT hide the report code line it appears on as a substituted value in a computed/defined field.

1) -SET &HIDE='FOC_NONE';
2) TABLE FILE CAR 
3) PRINT CAR
4) BY '&HIDE' BY MODEL
5) END


The server report engine parser will ignore ALL of line 4.

Dinesh, you cannot program conditional page footings but you can program conditional subfoots, but even that may not get you what you need if you need it to always appear at the bottom of the page.

If you think a conditional subfoot might be the ticket, the following code is a quick example:

TABLE FILE CAR
PRINT MODEL
BY DEALER_COST
BY CAR 
BY MODEL NOPRINT SUBFOOT
"***SUBFOOT***"
WHEN MODEL EQ 'TR7'
END



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
 
Posts: 161 | Location: Dallas, TX | Registered: February 20, 2009Report This Post
Gold member
posted Hide Post
The FOC_NONE in the above example doesn't work.

Try this:

TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
BY CAR PAGE-BREAK
ON CAR SUBFOOT
"Line 1"
"Line 2"
"etc."
WHEN CAR EQ 'JAGUAR'
END

You can not do a WHEN condition on the HEADING/FOOTING in 764 (I believe you can in 7.7.02)


WF 7.6.10, Windows, PDF, Excel
 
Posts: 75 | Location: Dallas, TX | Registered: February 12, 2004Report This Post
Expert
posted Hide Post
Have you looked into using the WHEN command. It allows you to test data to determine whether to display a subfoot, etc.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
What you can do is use CSS to hide the footing (provided your output format is HTML of course). You'll need to provide a CSS file
ON TABLE SET CSSURL your-css-file
, in which you can define a CSS class :
.hidden { display: none; }


With that you can conditionally refer to that in your webFOCUS stylesheet using:
TYPE=FOOTING, CLASS=hidden, WHEN=CAR EQ 'JAGUAR',$


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
Platinum Member
posted Hide Post
Mary/Ginny, we were thinking along the same lines at about the same time!

Wep, you are thinking out of the box, but using a condition on the FOOTING stylesheet element works on the same principle as displaying data in a footing, it will only work with the last value on the page. You did give me an idea, though.

Here's a CAR database example that should work (HTML and PDF) for Dinesh showing the FOOTING only when the page contains the target data:

-SET &CAR='DATSUN';
-SET &LNSPP=15;
TABLE FILE CAR
HEADING
"Page: <TABPAGENO </1"
SUM CAR
TABPAGENO NOPRINT
COMPUTE CARMARK/I1=IF CAR EQ '&CAR' THEN 1 ELSE 0;NOPRINT
COMPUTE FOOTMARK/P8=IF TABPAGENO     NE LAST TABPAGENO THEN CARMARK ELSE
		  IF CARMARK       EQ 1              THEN 1       ELSE
		  IF LAST FOOTMARK EQ 1              THEN 1       ELSE 0;NOPRINT
COMPUTE FOOT/A75=IF FOOTMARK EQ 1 THEN 'This FOOTING will appear on the page where the CAR is &CAR.EVAL .' ELSE '';NOPRINT 
BY COUNTRY
BY MODEL 
FOOTING
"<FOOT</1"
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET PAGE NOLEAD
ON TABLE SET LINES &LNSPP.EVAL
ON TABLE SET STYLE *
GRID=OFF,$
TYPE=FOOTING,COLOR=RED,$
ENDSTYLE
END


This will force the FOOTING to appear only on the page where DATSUN appears.

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



In FOCUS since 1985 - WF 8.009/8.104 Win 8 Outputs: ALL of 'em! Adapters: Sql Server Teradata Oracle
 
Posts: 161 | Location: Dallas, TX | Registered: February 20, 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] Conditional Footing

Copyright © 1996-2020 Information Builders