Jump to content

Making band height auto expandable


yapkm01

Recommended Posts

Hi,

I have posted this problem on the iReport forum and they ask me to post this on the jasper report forum. Anyway here it is.

***********************************************************************************************************************************

I am using ireport 3.5.2 to produce an excel report as per attachment. If  you look at row 32 on the security column, a portion of the word are covered since the data is quite long. The band height is 17. How do i make this band height auto expandable depending on the data without changing the band height 17 to say 20 in ireport. If i make the band height to 22 .. the security data on row 32 looks fine but then all the rest of security data sits on a bigger cell - which doesnt really look pleasing to the eyes. Please advice.

==============================================================================================

hm, I'm not sure, I assume you want to auto-adjust the cell height. Try posting this question to the JasperReports forums, maybe they have some trick.

Giulio



Post Edited by yapkm01 at 07/20/2009 20:25



Post Edited by yapkm01 at 07/20/2009 20:26



Post Edited by yapkm01 at 07/20/2009 20:29



Post Edited by yapkm01 at 07/21/2009 14:14
Link to comment
Share on other sites

  • 5 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

Although the XLS format is not guaranteed to be pixel perfect in JasperReports, due to the fact that we cannot fully control text spacing and word wrap in this format, in this particular case it might be a classical font mismatch problem.

You have used the font "sansserif" in your report template, as it seems. This is a Java logical font which is mapped to a different physical font depending on the platform. On Windows might be Arial, on Linux might be Helvetica. You never know.

What is for sure is that Excel does not know anything about a font named sansserif, and uses whatever default font it has at hand, which is probably different than the font JR used to calculate row height and as you can see, the text no longer fits, due to the different font metrics involved. There is no setting that would allow us to make the row auto-adjust, or if there is, we have not found it yet.

So I suggest you try use a real font that you are pretty sure will be available to Excel when the filed is viewed.

 

I hope this helps.

Teodor

 

Link to comment
Share on other sites

  • 1 month later...

Hi Teodor,

I am also getting the same problem.

As you suggested to use a real font i have used font as "Arial" and font Size="10".

But still i am getting the same problem.To see the complete text i have to double click on the cell.Please suggest some workaround for it.

 

Thanks in advance.

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