Focal Point
[SOLVED] Need to print out less than symbol in a concatenation (SOLVED)

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9407060096

April 30, 2018, 01:42 PM
rray9895
[SOLVED] Need to print out less than symbol in a concatenation (SOLVED)
Hey guys,

I am having an issue where I need a less than symbol in a define file that I am concatenating.

So if I want to print when I run the report I would expect this code below to work.

 DEFINE FILE CAR
CODE/A26 = '<'|'test'|'>';
END

TABLE FILE CAR
PRINT *
CODE
END 


However, the < symbol is used to print fields in Heading and Footings when used in conjunction with a field name. In my example code, it is looking for a field called test> and prints nothing when it can't find it.

Things I have tried:
1. Searching the forums

The only result I'm getting is related to putting the less than symbol in a heading. I need my report to have it in a define file.

2. HEXBYT
 DEFINE FILE CAR
CODE/A26 = HEXBYT(60,'A1')|'test'|'>';
END

TABLE FILE CAR
PRINT *
CODE
END
-EXIT 


This gives me the same error. The report still interprets the "<" as a request for a field called "test>" and displays nothing.

3. Storing < in a different define file variable
 DEFINE FILE CAR
LT_CHAR/A1 = '<';
CODE/A26 = LT_CHAR|'test'|'>';
END

TABLE FILE CAR
PRINT *
CODE
END
-EXIT 


Different approach, same results. At this point, I don't know what else I can try. Does anyone here have any ideas?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.105M, Windows 10, App Studio
April 30, 2018, 02:24 PM
David Briars
quote:
Does anyone here have any ideas?


Given your first example, you can turn on HTML encoding, to encode the 'test HTML tag':
DEFINE FILE CAR
 CODE/A26 = '<'|'test'|'>';
END

TABLE FILE CAR
PRINT *
      CODE
ON TABLE SET HTMLENCODE ON
END   

April 30, 2018, 02:29 PM
rray9895
Thank you so much. This looks like it is doing exactly what I need!


WebFOCUS 8.105M, Windows 10, App Studio