< a>用于超链接的html标记在Jasper Report中不起作用 [英] <a> html tag used for hyperlink doesn't work in Jasper Report

查看:63
本文介绍了< a>用于超链接的html标记在Jasper Report中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想把一个单词的一个单词作为超链接. 我写成: 点击我们的< a href ="http://www.google.co.in">网站</a>以了解详细信息. 文本字段的标记属性也被选择为"html". 但是未创建超链接. 请帮忙.

I want to make one word of a sentence as a hyperlink. I have written it as : Click on our <a href="http://www.google.co.in"> website </a> to know the details. The markup property of the text field is also selected as "html". But the hyperlink is not created. Please help.

推荐答案

我知道这个问题已经很老了,但是如果有人需要一个代码,我会在这里添加它:

I know the question is pretty old, but if somebody need a code, I will add it here:

<textField>
    <reportElement positionType="Float" x="220" y="45" width="406" height="60"/>
    <textElement markup="html">
        <font fontName="Arial" size="8"/>
    </textElement>
    <textFieldExpression><![CDATA["Click on our"+"<u><font color='blue'><a href='http://www.google.co.in'>website</a></font></u>"]]> 
    </textFieldExpression>
</textField>

这篇关于&lt; a&gt;用于超链接的html标记在Jasper Report中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆