如何为Jasperstudio创建此代码,在报告中的iframe上显示页面(按网址)?
使用文本框和html组件。
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<p><a href="http://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>
任何方向都会有所帮助,这是我到目前为止的想法。
<componentElement>
<reportElement x="260" y="20" width="190" height="50" uuid="b7e534fb-15d5-4138-9522-793cf8d71afe">
<property name="net.sf.jasperreports.export.flash.element.allow.script.access" value="frame"/>
</reportElement>
<hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
<hc:htmlContentExpression><![CDATA["page will be displayed here"]]></hc:htmlContentExpression>
</hc:html>
</componentElement>
<componentElement>
<reportElement x="0" y="20" width="190" height="50" uuid="b7e534fb-15d5-4138-9522-793cf8d71afe"/>
<hc:html xmlns:hc="http://jasperreports.sourceforge.net/htmlcomponent" xsi:schemaLocation="http://jasperreports.sourceforge.net/htmlcomponent http://jasperreports.sourceforge.net/xsd/htmlcomponent.xsd" scaleType="RetainShape" horizontalAlign="Left" verticalAlign="Middle">
<hc:htmlContentExpression><![CDATA["<a href='http://google.ca' target='frame'>click to go to google.ca</a>"]]></hc:htmlContentExpression>
</hc:html>
</componentElement>