Focal Point
HTML in Heading ?

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

January 24, 2006, 09:11 AM
MTracker
HTML in Heading ?
I would like to add some html code in the heading of a report. I thought I might be able to just create an amper variable and assign the HTML code to it. Then use the amper variable in one of the heading lines. Like the following:

-SET &RADIO ='INPUT TYPE=RADIO...'

(I left the < out in the message as the BB thinks I really want too show the tag.)

The problem is that WebFocus thinks the "<" symbol means I want to pipe the contents of a variable instead. So it's looking for a variable named INPUT.

I didn't want to use a template if I didn't really need to. Any ideas?

This message has been edited. Last edited by: MTracker,
January 24, 2006, 09:36 AM
Kamesh
Yes, you can do that

-SET &RADIO1='INPUT TYPE=Radio value="xX">';
-SET &RADIO2='<' | '&RADIO1' ;
you can do this way or you can use DEFINE
-SET &RADIO1='INPUT TYPE=Radio value="xX">';
DEFINE FILE TEST
RADIO/A100v='<' | '&RADIO1' ;
END


WFConsultant

WF 8105M on Win7/Tomcat
January 24, 2006, 09:57 AM
MTracker
Yes, I know that I could use a define to create a field on each row. The problem with that is that the types of reports I want to use this on have a large number of rows. So if the field that contains the radio button code is say 100 characters you'd be adding that to every row.

I was hoping not to add a lot of overhead to the report. Or maybe I'm not quite following your idea?
January 24, 2006, 10:39 AM
Kamesh
You are going to use that DEFINE Field only in your Heading.

HEADING
" <RADIO "


WFConsultant

WF 8105M on Win7/Tomcat
January 24, 2006, 10:48 AM
Tony A
If you do not have too many output rows then you could use a COMPUTE instead of the DEFINE which is only computed on each output row instead of each input row.

Failing that you could just COMPUTE a single field (say ht/A1) and equate it to the left carat with the NOPRINT option. Then you can just replace the opening tag with that field something like -
TABLE FILE CAR
SUM RCOST
    DCOST
    COMPUTE ht/A1 = '<'; NOPRINT
BY COUNTRY
BY CAR
BY MODEL
WHERE COUNTRY EQ '&Country'
HEADING
"<ht|form name=form method=get action=/cgi-bin/ibi_cgi/ibiweb.exe>
-* The following code should all be on one line!
<ht|table><ht|tr><ht|td width=10%>
England
<ht|/td><ht|td><ht|input name=Country type=radio value=ENGLAND checked=1><ht|/td>
<ht|td width=80% rowspan=2><ht|input type=submit><ht|/td><ht|/tr>
<ht|tr><ht|td width=10%>
Italy
<ht|/td><ht|td><ht|input name=Country type=radio value=ITALY><ht|/td><ht|/tr>
<ht|/table><ht|/form>"


Any help?

T

p.s. apologies that the line is soooooo wide, but you have to be careful with breaking up of the heading tags that WF generates! Frowner

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



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 24, 2006, 11:00 AM
Francis Mariani
This works:

-SET &RADIO1 = 'Radio 1<INPUT TYPE=RADIO VALUE="RED">';

TABLE FILE CAR
PRINT MODEL
BY COUNTRY
HEADING
"THIS IS THE HEADING"
"!IBI.AMP.RADIO1;"
" "
ON TABLE HOLD AS H001 FORMAT HTMTABLE
END
-RUN

-HTMLFORM BEGIN
!IBI.FIL.H001;
-HTMLFORM 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
January 24, 2006, 02:43 PM
MTracker
Yes, that does work very nicely. Thanks.