I found the information in this thread very useful, but I'm still having a slightly different problem with the & character.
I would like to include an HTML link in a text field using an XML file as my data source. The simple case below works and everything renders correctly including the link in my PDF output:
However, when I try and add more than one parameter to my link (? for first param, & for multiple params), the & character completely messes up the style and all the source HTML is clearly displayed. For example:
Obviously, I don't want my users to see the source HTML for the "a href" tag, and I don't want to limit my users data by restricting them to only one parameter max for HTML links.
Also I do not know where the additional text type="Reference" comes from in the displayed link. It must be some type of short circuit with the & character and the HTML markup processor.
Is Styled text and &
in Products
Posted
I found the information in this thread very useful, but I'm still having a slightly different problem with the & character.
I would like to include an HTML link in a text field using an XML file as my data source. The simple case below works and everything renders correctly including the link in my PDF output:
Report Text Field Definition
<textField isStretchWithOverflow="true">
<reportElement stretchType="RelativeToBandHeight" x="400" y="20" width="155" height="20"/>
<textElement markup="html"/>
Desired HTML
For help go to: <a href="http://www.google.com">Google</a>
XML element
<HtmlLink>For help go to: <a href="http://www.google.com">Google</a></ HtmlLink >
Desired HTML
For more help go to: <a href="http://support.google.com/bin/static.py?page=portal_groups.cs&hl=en">Google Help</a>
XML element
<HtmlLink>For more help go to: <a href="http://support.google.com/bin/static.py?page=portal_groups.cs&hl=en">Google Help</a></ HtmlLink >
For more help go to: <a href="http://support.google.com/bin/static.py?page=portal_groups.cs&hl=en" type="Reference">Google Help</a>
Obviously, I don't want my users to see the source HTML for the "a href" tag, and I don't want to limit my users data by restricting them to only one parameter max for HTML links.
Also I do not know where the additional text type="Reference" comes from in the displayed link. It must be some type of short circuit with the & character and the HTML markup processor.
Any suggestions?
Thanks in advance,
TK
Post Edited by tkofford at 02/23/2012 15:59
Post Edited by tkofford at 02/23/2012 16:00