Home
Analytics
HTML tag behavior
sheekc
I've been experimenting with adding HTML <form> tags into a report to encapsulate an area of the report as an HTML form in BIRT 2.1.2.
Unfortunately, when I specify an opening tag without a corresponding closing tag in a Text report item, the HTML is created with a(n) (unwanted) closing tag, and my closing tag (in a different Text report item) is not created.
Editing the XML source directly to add the tags generates an error.
Is there any way to accomplish what I am trying to do?
Find more posts tagged with
Comments
bhanley
Are you formatting the Text item as HTML? There is a drop-down box at the top of the edit dialog. in that drop-down, select HTML to ensure the text is parsed correctly.
sheekc
Yes, I am specifying HTML. I have verified this by examining the XML source. Scripting the content makes no difference.
XML source:
.
.
.
<body>
<text id="133">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<form name="data">]]></text-property>
</text>
<table name="Table1" id="88">
.
.
.
<text id="129">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[<input type="submit" value="Click">]]></text-property>
</text>
<text id="134">
<property name="contentType">html</property>
<text-property name="content"><![CDATA[</form>]]></text-property>
</text>
</body>
</report>
generated HTML source:
.
.
.
<body class="style_0">
<div style=" width:8.5in;">
<div></div>
<div>
<div style=" text-align:left;">
<form name="data"></form>
</div>
<table...
.
.
.
</table>
<div style=" text-align:left;">
<input type="submit" value="Click"></input>
</div>
<div style=" text-align:left;"></div>
</div>
<div>
<div style=" text-align:left;">Apr 22, 2009 7:41 AM</div>
</div>
</div>
</body>
</html>
bhanley
Are you adding a text item to formally close the form? I have done this many, many times without issue, so I am sure it is just in your design set up. The layout I have always used is like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>TEXT ITEM: Open Form (<FORM ...>)
Various Report Items (Table, Chart, More Text Items etc...)
TEXT ITEM: Close Form (</FORM>)
</pre>
Then when the report is rendered in HTML, the two Text Items logically sync up to complete the form. You can then do whatever you want with the form (including submitting it to another process).<br />
<br />
If the layout above matches your layout (roughly), attach your design to the thread and I will have a look.
sheekc
Attached is the source.