Jump to content
We've recently updated our Privacy Statement, available here ×

Rotation of Text in Crosstab in 4.5.0


ayengar

Recommended Posts

Hi.

For reasons too complicated to go into, I have to deploy a new report onto an existing JasperReports Server 4.5.0 installation.  It cannot be upgraded.  I figured that it would be easiest to use iReport 4.5.0 to ensure compatibility with the Server.  Am I mistaken?  Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else?

The report involves a crosstab with many columns.  In order to get them all to fit on one standard landscape page, I need to change the rotation of the column headers to vertical.  The data inside the cells themselves is very short.  I couldn't find an option in iReport to change the rotation of the text in the header, so I changed the XML from:

                    <crosstabColumnHeader>
                        <cellContents backcolor="#F0F8FF" mode="Opaque">
                            <box>
                                <pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                            </box>
                            <textField>
                                <reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="30"/>
                                <textElement/>
                                <textFieldExpression><![CDATA[$V{ACTION_DESC}]]></textFieldExpression>
                            </textField>
                        </cellContents>
                    </crosstabColumnHeader>

To:

                    <crosstabColumnHeader>
                        <cellContents backcolor="#F0F8FF" mode="Opaque">
                            <box>
                                <pen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                            </box>
                            <textField>
                                <reportElement style="Crosstab Data Text" x="0" y="0" width="50" height="30"/>
                                <textElement rotation="Left"/>
                                <textFieldExpression><![CDATA[$V{ACTION_DESC}]]></textFieldExpression>
                            </textField>
                        </cellContents>
                    </crosstabColumnHeader>

It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...