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     Heading display question.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Heading display question.
 Login/Join
 
Platinum Member
posted
In the following code, I need the second line in the heading to be displayed only if the SALES is more than 0. Otherwise that line should not be displayed.

TABLE FILE CAR
PRINT CAR DEALER_COST RETAIL_COST
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK
HEADING
"Car Details"
"Car Sales <SALES"
END

Please let me know.

This message has been edited. Last edited by: Cyril Joy,


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Virtuoso
posted Hide Post
if you put your code in between the following code it will be working as you want.

[CODE]

[/CODE]

is it a report heading or a page heading you want this?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
Thanks for that information.

It is a report heading.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Guru
posted Hide Post
How about
DEFINE FILE CAR
SOME_WORDS/A60 = 'Car Sales ' | SALES;
OTHER_WORDS/A60 = ' ';
HEAD_LINE2/A60 = IF SALES GT 0 THEN SOME_WORDS ELSE OTHER_WORDS;
END

Or get the sales number into an amper var.

HEADING
" "
"<HEAD_LINE2"

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


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Platinum Member
posted Hide Post
That will not workout as I am printing a table column in the heading.

"Car Sales <SALES"

SALES is a table column.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Silver Member
posted Hide Post
While JIMSTER's idea should work, it could cause overhead in processing due to having the extra define fields.

There is a way to put a WHEN condition on a SUBHEAD. I don't think this works with HEADING and I no longer have somewhere where I can test it before I sent this off to you.

If you replace the HEADING with the following:

ON COUNTRY SUB-HEAD
"Car Details"
"Car Sales <SALES" 
 WHEN SALES NE 0;
 
ON COUNTRY SUB-HEAD
"Car Details"
 WHEN SALES EQ 0;

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


------------------------------------------
last version used: v7.1; truly miss the wonderful things I did with WebFOCUS, HTML, & JavaScript.
 
Posts: 36 | Location: Rolling Meadows, IL | Registered: September 05, 2007Report This Post
Platinum Member
posted Hide Post
Or you can branch over the second heading line with dialogue manager if sales is equal to zero.

TABLE FILE CAR
PRINT CAR DEALER_COST RETAIL_COST
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK
HEADING
"Car Details"
-IF SALES EQ 0 GOTO SKIPHDR2;
"Car Sales -SKIPHDR2
END


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
 
Posts: 149 | Location: Dallas, TX | Registered: June 08, 2007Report This Post
Guru
posted Hide Post
A couple of things here for informational purposes:

cmallain:
SUB-HEAD should be SUBHEAD but still will not work with the original PRINT because SALES will be the first and only the first SALES line for that country unless that is what you want.

linus:
'-IF SALES' is mixing DM and TF so WebFOCUS ignores this step. WF does not know what SALES is when processing the DM lines. I'm actually surprised there is no error. I would expect one but didn't get it.

IHTH.
Greg



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
 
Posts: 274 | Location: Boston/New England | Registered: February 12, 2006Report This Post
Expert
posted Hide Post
How about this?
TABLE FILE CAR
SUM SALES BY COUNTRY 
PRINT CAR DEALER_COST RETAIL_COST
BY COUNTRY 
ON TABLE HOLD FORMAT ALPHA
END

TABLE FILE HOLD
PRINT CAR DEALER_COST RETAIL_COST
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK
HEADING
"Car Details for <COUNTRY"
ON COUNTRY SUBHEAD
"Car Sales <SALES"
WHEN SALES NE 0;
END  


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
Guru
posted Hide Post
For HTML output only, the following (using Ginny's hold file) gets around the HEADING/TITLE/SUBHEAD changing order depending on sales:
DEFINE FILE HOLD
SALESA/A8=FTOA(SALES,'(D6)',SALESA);
HDR2/A100V=IF SALES NE 0 THEN 'Car Details for ' | COUNTRY | '<BR>Car Sales ' | SALESA ELSE 'Car Details for ' | COUNTRY;
END
TABLE FILE HOLD
PRINT CAR DEALER_COST RETAIL_COST 
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK
HEADING
"<HDR2"
ON TABLE PCHOLD FORMAT HTML
END



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
 
Posts: 274 | Location: Boston/New England | Registered: February 12, 2006Report This Post
Platinum Member
posted Hide Post
Mine is a PDF output.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Platinum Member
posted Hide Post
Thanks for your suggestions.

SUBHEAD will not work in my Code as it is a part of the heading and there are more lines after and before it as follows:
TABLE FILE CAR
PRINT CAR DEALER_COST RETAIL_COST
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK
HEADING
"Car Details"
"Car Sales <SALES"
"More heading here"
END


Any other way to acheive this?


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Guru
posted Hide Post
Try this using the hold file, above:

DEFINE FILE HOLD
SALESA/A8=FTOA(SALES,'(D6)',SALESA);
HDR1/A100V=IF SALES NE 0 THEN 'Car Sales ' | SALESA ELSE 'More headings1';
HDR2/A100V=IF SALES NE 0 THEN 'More headings1' ELSE 'More headings2';
HDR3/A100V=IF SALES NE 0 THEN 'More headings2' ELSE 'More headings3';
HDR4/A100V=IF SALES NE 0 THEN 'More headings3' ELSE 'More headings4';
HDR5/A100V=IF SALES NE 0 THEN 'More headings4' ELSE '';
END
TABLE FILE HOLD
PRINT CAR DEALER_COST RETAIL_COST
BY COUNTRY NOPRINT
ON COUNTRY PAGE-BREAK
HEADING
"Car Details"
"<HDR1"
"<HDR2"
"<HDR3"
"<HDR4"
"<HDR5"
ON TABLE PCHOLD FORMAT PDF
END



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
 
Posts: 274 | Location: Boston/New England | Registered: February 12, 2006Report This Post
Gold member
posted Hide Post
Try this:

TABLE FILE CAR                                         
SUM SALES NOPRINT COMPUTE                              
  MYSAL/D12.2 = C1; NOPRINT COMPUTE                    
  MYLINE/A24 = IF MYSAL EQ 0 THEN ' ' ELSE             
    'Car Sales  ' | FTOA(MYSAL,'(D10)','A13') ; NOPRINT
BY COUNTRY NOPRINT                                     
PRINT CAR DEALER_COST RETAIL_COST SALES                
BY COUNTRY NOPRINT                                     
ON COUNTRY PAGE-BREAK                                  
HEADING                                                
"Car Details: <COUNTRY "                               
"<MYLINE "                                             
" "                                                    
END

This message has been edited. Last edited by: Edward Wolfgram,


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report This Post
Gold member
posted Hide Post
I'm having trouble getting the end of my post in Smiler
HEADING
"  Car Details: <COUNTRY "
"  <MYLINE " 
" "                           
END

This message has been edited. Last edited by: Edward Wolfgram,


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report This Post
Platinum Member
posted Hide Post
Edward,

As Frank suggested,

if you put your code in between the following code it will be working as you want.

[CODE]

[/CODE]

Smiler

quote:
Originally posted by Edward Wolfgram:
I'm having trouble getting the end of my post in Smiler
CODE
HEADING
" Car Details: " END
/CODE


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Platinum Member
posted Hide Post
Thanks gregv and Edward for your suggestions.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Platinum Member
posted Hide Post
GregV - You are correct. I guess I didn't slow down enough to think about the fact that SALES was not an &var.


WF 7.7.05
HP-UX - Reporting Server, Windows 2008 - Client, MSSQL 2008, FOCUS Databases, Flat Files
HTML, Excel, PDF
 
Posts: 149 | Location: Dallas, TX | Registered: June 08, 2007Report 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     Heading display question.

Copyright © 1996-2020 Information Builders