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

text rotation in browser


jrechter

Recommended Posts

In iReport, when I set text rotation to left in a static text box, the text fails to rotate in a browser.  It works properly when exported to PDF and XLS.  Are there any necessary settings to be made in iReport that would rotate text in a browser?  Maybe through Custom Properties?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

jrechter,

 

It's not possible today because HTML doesn't have a way to rotate text.

 

It could be done with CSS, so we can imagine a beautiful time in the future when the JR HTML exporter has a way to incorporate this... but it's not possible yet.

 

Regards,
Matt

 

P.S. I remember a case where a consultant started looking into creating a customized exporter that would render the text into a .png image that would show the text vertically... but in the end the client didn't care that much. Rotated in PDF was good enough, so they left it at that.

Link to comment
Share on other sites

  • 1 year later...

 Hi mdahlman,

I hate to jump into this topic like this but there actually is a way to have vertical text in modern browsers, and it looks like working .

Please have a look at http://scottgale.com/blog/css-vertical-text/2010/03/01/ where he has a single CSS that prevents from having browser checking in javascript and so on. 

 

Now, in order to make use of this css, is there a way I can specify a class in the generated html, using Jasper 4.0,  so that I can overwrite the default Jasper css while wating for version 4.1 ( in which I am sure they'll take this into account :D :D :D ) ? 

 

 

TIA

 

Marco

Link to comment
Share on other sites

Marco,

Yes, even back when I posted in 2009 it was possible to do this with CSS. I wrote that it wasn't possible without CSS. Since then we have added an XHTML exporter that makes better use of CSS. And it's well known that we would like to update this exporter to make much more efficient use of CSS. So we're on the path to allowing what you want! (If you haven't tried it already, you should export to XHTML to see the differences. It's probably closer to what you want.)

I see your other thread about specifying the class. I don't monitor the JR forum regularly. If you get an answer there (positive or negative) please post it here.

Regarding that link you supplied: first, it's very cool. But it also looks very brittle and relatively limited. It's not standard CSS; it needs to rely on -webkit-transform and -moz-transform and -o-transform. This doesn't make it terrible... but it's not a well establish solution that I would advocate JR ought to start using. Also, it look perfect for short titles like a crosstab might demand. But it looks to fall apart badly for longer text and wrapping or carriage returns.

Anyway, I realize that you're not really asking for JR to generate this yet. You're mostly asking for a way to put it into the reports yourself by having better access to your own custom CSS. It's a very reasonable request. If you determine that it's not possible, then please be sure to log an enhancement request for it. (In the JasperReports tracker, not the iReport one.)

Good luck,
Matt

Link to comment
Share on other sites

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...