Hi, I have a variable in report heading and that variable contains HTML tags (like
<HTML><B>
)in it. Its currently erroring out becoz of the '<' sign. is there any way to somehow mask the '<' sign and still retain the HTML tags. I already tried doing a computed field for the "," sign but it adds a space after the sign and becoz of that the tag is not valid anymore. and also i cannot create a computed field with that variable and use the field in the heading as my result set has more than million records. Here is the Sample code.
-SET &HEAD = '<html><body><div> This is test sample </div>
need to retain the html tags </p> </body> </html>';
-SET &HEAD1 = '<LT|html><LT|body><LT|div> This is test sample <LT|/div> <LT|p> need to retain the html tags <LT|/p> <LT|/body> <LT|/html>';
TABLE FILE CAR
PRINT
CAR
COMPUTE LT/A1='<';
HEADING
-*"&HEAD.EVAL"
-*"&HEAD1.EVAL"
" "
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
UNITS=IN,
TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL, $
TYPE=HEADING,ITEM=1,SIZE=10,STYLE=BOLD,COLSPAN =3,$
ENDSTYLE
END
This message has been edited. Last edited by: Kerry,
WF 7.7.05 on Linux HTML, PDF, EXCEL
January 18, 2013, 01:31 PM
wf_devloper
quote:
Originally posted by wf_devloper: Hi, I have a variable in report heading and that variable contains HTML tags (like <|HTML>,<|div> adding '|' to retain the tag in this document)in it. Its currently erroring out becoz of the '<' sign. is there any way to somehow mask the '<' sign and still retain the HTML tags. I already tried doing a computed field for the "," sign but it adds a space after the sign and becoz of that the tag is not valid anymore. and also i cannot create a computed field with that variable and use the field in the heading as my result set has more than million records. Here is the Sample code.
-SET &HEAD = '<|html><|body><|div> This is test sample <|/div> need to retain the html tags <|/p> <|/body> <|/html>'; -SET &HEAD1 = ' This is test sample need to retain the html tags ';
TABLE FILE CAR PRINT CAR COMPUTE LT/A1='<'; HEADING -*"&HEAD.EVAL" -*"&HEAD1.EVAL" " " ON TABLE SET HTMLCSS ON ON TABLE SET PAGE-NUM OFF ON TABLE SET PAGE NOLEAD ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * UNITS=IN, TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL, $ TYPE=HEADING,ITEM=1,SIZE=10,STYLE=BOLD,COLSPAN =3,$ ENDSTYLE END
WF 7.7.05 on Linux HTML, PDF, EXCEL
January 18, 2013, 01:54 PM
susannah
try using &|lt; and &|rt; for the left pointy bracket and right pointy bracket.
when you want to post code to this forum, surround your code with the code tags (see the little red icon right on the top of your edit message window)
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
January 18, 2013, 02:02 PM
wf_devloper
Hi Susannah, I tried &|lt; and &|gt; but they are not getting replaced as '<' and '>' in the Excel report heading output.
WF 7.7.05 on Linux HTML, PDF, EXCEL
January 18, 2013, 03:13 PM
Crymsyn
I tried storing &HEAD into a define and then used the define field in the header and it shows the text.
-SET &HEAD = '<|html><|body><|div> This is test sample <|/div> need to retain the html tags <|/p> <|/body> <|/html>';
-SET &HEAD1 = ' This is test sample need to retain the html tags ';
DEFINE FILE CAR
HEAD_DESC/A&HEAD.LENGTH='&HEAD.EVAL';
END
TABLE FILE CAR
PRINT
CAR
COMPUTE LT/A1='<';
HEADING
"<HEAD_DESC"
"&HEAD1.EVAL"
" "
ON TABLE SET HTMLCSS OFF
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
UNITS=IN,
TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL, $
TYPE=HEADING,ITEM=1,SIZE=10,STYLE=BOLD,COLSPAN =3,$
ENDSTYLE
END
WF: 8201, OS: Windows, Output: HTML, PDF, Excel
January 18, 2013, 03:20 PM
wf_devloper
Hi Crymsyn, I cannot use Define or Compute as my report result set is very big (more than million)
WF 7.7.05 on Linux HTML, PDF, EXCEL
January 20, 2013, 03:42 PM
Waz
What happens when you use a define ?
It should work.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
January 20, 2013, 05:47 PM
FrankDutch
More then a million?
I hope nobody needs to read or print this report. I would kost many trees.
Can you explain why you want to do this ? I get the feeling there is more behind this question.
Who needs 10.000 pages of printed data...
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
January 21, 2013, 07:23 AM
Alex
quote:
Who needs 10.000 pages of printed data...
Only someone thoroughly unschooled in the use of a computer and too intimidated by a keyboard to learn.
WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
January 21, 2013, 03:46 PM
Waz
wf_developer,
How is this output going to be used ?
You are talking about more than a million rows.
I did not think any excel would read all of it.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
January 22, 2013, 01:05 AM
wf_devloper
Basically its a scheduled report which gets bursted to many users and most of the times the result set before bursting is more than million records.
-SET &LETH = '<';
-SET &LESS = '!IBI.AMP.LETH;';
-SET &HEAD = &LESS |'html>' | &LESS | 'body>' | &LESS | 'div> This is test sample' |
- &LESS | '/div> need to retain the html tags ' |
- &LESS | '/p> ' | &LESS | '/body>' | &LESS | '/html>';
-SET &HEAD1 = ' This is test sample need to retain the html tags ';
TABLE FILE CAR
PRINT
CAR
COMPUTE LT/A1='<';
HEADING
"&HEAD"
"&HEAD1"
" "
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS H1 FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
TYPE=REPORT,GRID=OFF,FONT='ARIAL',SIZE=8,STYLE=NORMAL, $
TYPE=HEADING,ITEM=1,SIZE=10,STYLE=BOLD,COLSPAN =3,$
ENDSTYLE
END
-RUN
SET HTMLFORMTYPE = XLS
-HTMLFORM H1