如何在jasper报告中将文本字段旋转90度? [英] How to rotate text fields by 90 degrees in jasper reports?

查看:1855
本文介绍了如何在jasper报告中将文本字段旋转90度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用iReport设计器创建一些报告。在生成报告时,我遇到了一个要求,我必须在90度旋转中显示静态文本字段/标签,如下图所示:

I am creating some reports using iReport designer. While generating reports I came across a requirement where I have to display static text fields/labels in 90 degree rotation as shown in the below image:

我在互联网上搜索以获得此解决方案,我发现jaspersoft不支持文本字段轮换。我在这个问题的解决方案中看到了这一点。这个功能是否适用于任何新版本的jaspersoft?
或者有没有办法使用外部java程序来实现这个功能?

I was searching on internet to get solution for this and I came to know that jaspersoft doesn't support text field rotation. I read this in the solution for this question. Is this feature available in any new version of jaspersoft? Or is there any way to achieve this functionality using external java programs?

推荐答案

Jasper报告不支持旋转在某种程度上,但你的例子是rotation =Left,所以要旋转文本你应该在textElement示例上使用rotation属性

Jasper report does not support the rotation at a certain degree, but your example is rotation="Left", so to rotate the text you should use the rotation property on the textElement example

        <staticText>
            <reportElement x="100" y="2" width="100" height="75" uuid="ac56467b-05e7-4749-ab0a-cf15b3c2047d"/>
            <textElement rotation="Left">
                <paragraph lineSpacing="Single"/>
            </textElement>
            <text><![CDATA[YOUR TEXT]]></text>
        </staticText>

其中密钥代码为< textElement rotation =Left>

轮换可以有这些好处。

=在你的例子中,文字从下到上

Left = As in you example text goes from down to up

正确 =文字从上到下

UpsideDown =文字是颠倒的

如果您使用的是iReport,请查看属性选项卡>文本属性>旋转

If you are using iReport check out the properties tab > Text properties > Rotation

这篇关于如何在jasper报告中将文本字段旋转90度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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