[CLOSED] Displaying a parameter containing < (left carat) in header
I need to display a report title that is passed a parameter (&desc) that may contain a <
Example problem -SET &DESC = 'Hardware < $10,000'; -SET &HDROBJTITLE='2255' ||(' ' | &DESC); TABLE FILE CAR PRINT MODEL HEADING "Object Account: &HDROBJTITLE " END
I tried it with | as an escape character -SET &STR_LEN_AFTER= &DESC.LENGTH+4; -SET &HDROBJTITLE=STRREP(&DESC.LENGTH,&DESC, 1,'<', 2,'<|',&STR_LEN_AFTER,'A&STR_LEN_AFTER.EVAL');
If your report runs exclusively in HTML, you may try using STRREP to convert "<" to its equivalent HTML attribute: "&|lt;" -- note the "pipe" character escaping the ampersand which is needed to avoid Dialogue Manager trying to parse the value later on.
I'd go with DEFINE instead. Less manipulation and will work in other formats such as PDF without further changes.
Thanks guys, good to know not to bother bashing my head against it. Need it only for excel output but who knows in the future.
Ended up with the following as the solution. -SET &DESC = 'Hardware < $10,000'; DEFINE FILE CAR HDROBJTITLE /A46 = '2255' || (' ' | &DESC.QUOTEDSTRING); END TABLE FILE CAR PRINT MODEL HEADING "Object Account: " " END
WF 8.0.3 Windows Oracle
November 26, 2013, 07:59 PM
njsden
Glad to hear that works for you.
Would you please edit your post and prefix it with [CLOSED]? Thanks.