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] Display '<' character in header

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Display '<' character in header
 Login/Join
 
Member
posted
Is there a simple way to display the actual < character inside of a header

I have a scenario where Users select a sign in the criteria page and then enter a numeric value in a separate input field. In the report, I need to redisplay the sign they selected as well as its value in the header to document their selected criteria. Works well for anything but < or <=. Those are interpreted as WF looking for a field after the < sign.

Code example:

-SET &SIGN = '<';
-SET &UNIT_CNT = '10';
-SET &UNITHDR1 = 'Unit Count: ' | &SIGN | ' ' | &UNIT_CNT;

HEADING
"&UNITHDR1 "

The output I want is 'Unit Count: < 10'.

Ideas?

Thanks.

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


7.6.4
XP SP3
EXL2K, HTML, PDF
 
Posts: 26 | Location: Ohio | Registered: April 13, 2009Report This Post
Expert
posted Hide Post
 
DEFINE FILE WHATEVER
-SET &UNIT_CNT = '10';
-SET &SIGN = '=';
-*SET &SIGN = '<';
-*SET &SIGN = '>';
-SET &XSIGN = DECODE &SIGN ('<' 60 '=' 61 '>' 62 ELSE 32);
  X_SIGN/A1 = HEXBYT(&XSIGN,'A1');
  UNIT_CNT/A4 = '&UNIT_CNT';
  HD_LINE1/A25 = 'Unit Count ' | X_SIGN | ' ' | UNIT_CNT;
END
TABLE FILE WHATEVER
HEADING
"<HD_LINE1"

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Thanks Tom!

Your earlier code worked. Once I understood I needed to use ascii char conversion/HEXBYT function to get the output desired, I was able to write the functional process.


7.6.4
XP SP3
EXL2K, HTML, PDF
 
Posts: 26 | Location: Ohio | Registered: April 13, 2009Report This Post
Expert
posted Hide Post
Welcome. EDITed the thread to show options, BUT, you got it.

Very Good...Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
BTW, Waz, from Australia, let me know about another, streamlined solution:

 
DEFINE FILE WHATEVER 
-SET &UNIT_CNT = '10';
-SET &SIGN = '<';
  HD_LINE1/A25 = 'Unit Count ' | '&SIGN ' | '&UNIT_CNT';
END
TABLE FILE WHATEVER
HEADING
"<HD_LINE1"


I tend to take the long and winding road...

THANKS WAZ


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
Hmm, seems I tried something similiar to WAZ solution and it still didn't work. In runtime, the &SIGN conversion resulted in a field '10' not recognized error. However, I did not define a HD_LINE1 field - I tried to using &SIGN directly in heading area. Perhaps the use of the define field makes all the difference.

Very interesting to see the various approaches folks take in resolving an issue.

I appeciate all the suggestions.


7.6.4
XP SP3
EXL2K, HTML, PDF
 
Posts: 26 | Location: Ohio | Registered: April 13, 2009Report This Post
Expert
posted Hide Post
Tested for >, >=, <, <=, =:

-DEFAULT &SIGN = '<';
-DEFAULT &SALES = '13000';

-SET &OP1 = DECODE &SIGN('>=' 'GE', '>' 'GT', '<' 'LT', '<=' 'LE' ELSE 'EQ');

-SET &UNITHDR1 = 'SALES FILTER: <SIGN &SALES.EVAL';

TABLE FILE CAR
SUM
COMPUTE SIGN/A2 = '&SIGN'; NOPRINT
SALES
BY COUNTRY
BY CAR
BY MODEL
WHERE SALES &OP1 &SALES
HEADING
"SALES REPORT"
"&UNITHDR1"
END


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
quote:
Originally posted by Tom Flynn:
... 
-SET &UNIT_CNT = '10';
-SET &SIGN = '<';
  HD_LINE1/A25 = 'Unit Count ' | '&SIGN ' | '&UNIT_CNT';
...


You don't need the catenation. Just
HD_LINE1/A25 = 'Unit Count < 10';
will do.

If those are run-time parameters, use
HD_LINE1/A25 = 'Unit Count &SIGN &UNIT_CNT';
which boils down to the same thing, after amper vars are substituted.

The main thing is to make the "<" sign part of the value of a report variable and embed the report variable in the heading, rather than making "<" part of the fixed text of the heading line; dialog manager, amper variables, and catenation to isolate the "<" are not required.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 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] Display '<' character in header

Copyright © 1996-2020 Information Builders