Rotation of Text in Crosstab in Jasper Reports 4.5.0












0















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>


(In case you don't see it, I added a rotation="Left" to the textElement.)



It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken?










share|improve this question

























  • Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else? - You can use JSS and save report at compatability mode

    – Alex K
    Nov 16 '18 at 21:37











  • I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken? - Did you try to do it not at crosstab, just one textField placed at Title, for example?

    – Alex K
    Nov 16 '18 at 21:39











  • Rotation is working at crosstab, definitely. Last time I used a lot such textFields at JR 6.x

    – Alex K
    Nov 16 '18 at 21:41











  • It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. - Did you try to increase height of textField?

    – Alex K
    Nov 16 '18 at 21:42













  • @AlexK Increasing the height of the textField did the job. I've been beating my head against that for hours. I just didn't think of it. Put it in an answer and I'll accept. Thanks.

    – Tripp Kinetics
    Nov 16 '18 at 22:14


















0















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>


(In case you don't see it, I added a rotation="Left" to the textElement.)



It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken?










share|improve this question

























  • Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else? - You can use JSS and save report at compatability mode

    – Alex K
    Nov 16 '18 at 21:37











  • I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken? - Did you try to do it not at crosstab, just one textField placed at Title, for example?

    – Alex K
    Nov 16 '18 at 21:39











  • Rotation is working at crosstab, definitely. Last time I used a lot such textFields at JR 6.x

    – Alex K
    Nov 16 '18 at 21:41











  • It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. - Did you try to increase height of textField?

    – Alex K
    Nov 16 '18 at 21:42













  • @AlexK Increasing the height of the textField did the job. I've been beating my head against that for hours. I just didn't think of it. Put it in an answer and I'll accept. Thanks.

    – Tripp Kinetics
    Nov 16 '18 at 22:14
















0












0








0








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>


(In case you don't see it, I added a rotation="Left" to the textElement.)



It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken?










share|improve this question
















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>


(In case you don't see it, I added a rotation="Left" to the textElement.)



It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken?







jasper-reports crosstab text-rotating






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 21:35









Alex K

18.4k1480158




18.4k1480158










asked Nov 16 '18 at 21:25









Tripp KineticsTripp Kinetics

4,43011732




4,43011732













  • Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else? - You can use JSS and save report at compatability mode

    – Alex K
    Nov 16 '18 at 21:37











  • I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken? - Did you try to do it not at crosstab, just one textField placed at Title, for example?

    – Alex K
    Nov 16 '18 at 21:39











  • Rotation is working at crosstab, definitely. Last time I used a lot such textFields at JR 6.x

    – Alex K
    Nov 16 '18 at 21:41











  • It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. - Did you try to increase height of textField?

    – Alex K
    Nov 16 '18 at 21:42













  • @AlexK Increasing the height of the textField did the job. I've been beating my head against that for hours. I just didn't think of it. Put it in an answer and I'll accept. Thanks.

    – Tripp Kinetics
    Nov 16 '18 at 22:14





















  • Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else? - You can use JSS and save report at compatability mode

    – Alex K
    Nov 16 '18 at 21:37











  • I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken? - Did you try to do it not at crosstab, just one textField placed at Title, for example?

    – Alex K
    Nov 16 '18 at 21:39











  • Rotation is working at crosstab, definitely. Last time I used a lot such textFields at JR 6.x

    – Alex K
    Nov 16 '18 at 21:41











  • It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. - Did you try to increase height of textField?

    – Alex K
    Nov 16 '18 at 21:42













  • @AlexK Increasing the height of the textField did the job. I've been beating my head against that for hours. I just didn't think of it. Put it in an answer and I'll accept. Thanks.

    – Tripp Kinetics
    Nov 16 '18 at 22:14



















Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else? - You can use JSS and save report at compatability mode

– Alex K
Nov 16 '18 at 21:37





Would it be better to use a newer version, or to switch to Jaspersoft Studio, or something else? - You can use JSS and save report at compatability mode

– Alex K
Nov 16 '18 at 21:37













I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken? - Did you try to do it not at crosstab, just one textField placed at Title, for example?

– Alex K
Nov 16 '18 at 21:39





I have seen others referring to text rotation in versions even older than mine, so I didn't think that it's unsupported in 4.5.0. Again, am I mistaken? - Did you try to do it not at crosstab, just one textField placed at Title, for example?

– Alex K
Nov 16 '18 at 21:39













Rotation is working at crosstab, definitely. Last time I used a lot such textFields at JR 6.x

– Alex K
Nov 16 '18 at 21:41





Rotation is working at crosstab, definitely. Last time I used a lot such textFields at JR 6.x

– Alex K
Nov 16 '18 at 21:41













It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. - Did you try to increase height of textField?

– Alex K
Nov 16 '18 at 21:42







It doesn't seem to have any effect on the preview, whether I'm previewing to HTML or PDF. - Did you try to increase height of textField?

– Alex K
Nov 16 '18 at 21:42















@AlexK Increasing the height of the textField did the job. I've been beating my head against that for hours. I just didn't think of it. Put it in an answer and I'll accept. Thanks.

– Tripp Kinetics
Nov 16 '18 at 22:14







@AlexK Increasing the height of the textField did the job. I've been beating my head against that for hours. I just didn't think of it. Put it in an answer and I'll accept. Thanks.

– Tripp Kinetics
Nov 16 '18 at 22:14














1 Answer
1






active

oldest

votes


















1














Is it possible to use JaspersoftStudio (JSS) instead of iReport 4.5.0?



Yes, for designing and testing templates locally. You can use compatibility mode to save template in format of JasperReports 4.5.0 version.



But I'm not sure that the integration with old versions of JasperReports Server will be work ok at new versions of JSS.



Does crosstab support vertical rotated text (at header, for example)?



Yes, definitely. Rotation is supported by textField element, it is not the feature of crosstab.



The iReport has the ability to change rotation of text. You can find property Rotation at Text properties block.



The property for changing text orientation



The cause of issue you faced is that the size of textField is not enough for showing text. For example if we have textField with default horizontal text with its height too small for showing the text the rendered result will be empty.



You should just increase the height of textField to solve issue.





Notes



More details how to enable compatibility mode at JSS you can find here and here






share|improve this answer


























  • Thanks again, sir.

    – Tripp Kinetics
    Nov 17 '18 at 17:14











  • You are welcome :)

    – Alex K
    Nov 17 '18 at 17:15











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345603%2frotation-of-text-in-crosstab-in-jasper-reports-4-5-0%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Is it possible to use JaspersoftStudio (JSS) instead of iReport 4.5.0?



Yes, for designing and testing templates locally. You can use compatibility mode to save template in format of JasperReports 4.5.0 version.



But I'm not sure that the integration with old versions of JasperReports Server will be work ok at new versions of JSS.



Does crosstab support vertical rotated text (at header, for example)?



Yes, definitely. Rotation is supported by textField element, it is not the feature of crosstab.



The iReport has the ability to change rotation of text. You can find property Rotation at Text properties block.



The property for changing text orientation



The cause of issue you faced is that the size of textField is not enough for showing text. For example if we have textField with default horizontal text with its height too small for showing the text the rendered result will be empty.



You should just increase the height of textField to solve issue.





Notes



More details how to enable compatibility mode at JSS you can find here and here






share|improve this answer


























  • Thanks again, sir.

    – Tripp Kinetics
    Nov 17 '18 at 17:14











  • You are welcome :)

    – Alex K
    Nov 17 '18 at 17:15
















1














Is it possible to use JaspersoftStudio (JSS) instead of iReport 4.5.0?



Yes, for designing and testing templates locally. You can use compatibility mode to save template in format of JasperReports 4.5.0 version.



But I'm not sure that the integration with old versions of JasperReports Server will be work ok at new versions of JSS.



Does crosstab support vertical rotated text (at header, for example)?



Yes, definitely. Rotation is supported by textField element, it is not the feature of crosstab.



The iReport has the ability to change rotation of text. You can find property Rotation at Text properties block.



The property for changing text orientation



The cause of issue you faced is that the size of textField is not enough for showing text. For example if we have textField with default horizontal text with its height too small for showing the text the rendered result will be empty.



You should just increase the height of textField to solve issue.





Notes



More details how to enable compatibility mode at JSS you can find here and here






share|improve this answer


























  • Thanks again, sir.

    – Tripp Kinetics
    Nov 17 '18 at 17:14











  • You are welcome :)

    – Alex K
    Nov 17 '18 at 17:15














1












1








1







Is it possible to use JaspersoftStudio (JSS) instead of iReport 4.5.0?



Yes, for designing and testing templates locally. You can use compatibility mode to save template in format of JasperReports 4.5.0 version.



But I'm not sure that the integration with old versions of JasperReports Server will be work ok at new versions of JSS.



Does crosstab support vertical rotated text (at header, for example)?



Yes, definitely. Rotation is supported by textField element, it is not the feature of crosstab.



The iReport has the ability to change rotation of text. You can find property Rotation at Text properties block.



The property for changing text orientation



The cause of issue you faced is that the size of textField is not enough for showing text. For example if we have textField with default horizontal text with its height too small for showing the text the rendered result will be empty.



You should just increase the height of textField to solve issue.





Notes



More details how to enable compatibility mode at JSS you can find here and here






share|improve this answer















Is it possible to use JaspersoftStudio (JSS) instead of iReport 4.5.0?



Yes, for designing and testing templates locally. You can use compatibility mode to save template in format of JasperReports 4.5.0 version.



But I'm not sure that the integration with old versions of JasperReports Server will be work ok at new versions of JSS.



Does crosstab support vertical rotated text (at header, for example)?



Yes, definitely. Rotation is supported by textField element, it is not the feature of crosstab.



The iReport has the ability to change rotation of text. You can find property Rotation at Text properties block.



The property for changing text orientation



The cause of issue you faced is that the size of textField is not enough for showing text. For example if we have textField with default horizontal text with its height too small for showing the text the rendered result will be empty.



You should just increase the height of textField to solve issue.





Notes



More details how to enable compatibility mode at JSS you can find here and here







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 17 '18 at 13:13

























answered Nov 17 '18 at 13:03









Alex KAlex K

18.4k1480158




18.4k1480158













  • Thanks again, sir.

    – Tripp Kinetics
    Nov 17 '18 at 17:14











  • You are welcome :)

    – Alex K
    Nov 17 '18 at 17:15



















  • Thanks again, sir.

    – Tripp Kinetics
    Nov 17 '18 at 17:14











  • You are welcome :)

    – Alex K
    Nov 17 '18 at 17:15

















Thanks again, sir.

– Tripp Kinetics
Nov 17 '18 at 17:14





Thanks again, sir.

– Tripp Kinetics
Nov 17 '18 at 17:14













You are welcome :)

– Alex K
Nov 17 '18 at 17:15





You are welcome :)

– Alex K
Nov 17 '18 at 17:15


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53345603%2frotation-of-text-in-crosstab-in-jasper-reports-4-5-0%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini