imams Posted May 5, 2008 Share Posted May 5, 2008 Hi,I am using JasperReports 1.2.7 in my J2EE project. I am able to export the generated report with Jasper API. My problem is the generated excel is not properly formatted- if the cell cannot accomodate the text content, then it does not warp. Any suggestions would be really appreciated. size=183]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/JasperExcel__Problem.JPG Link to comment Share on other sites More sharing options...
ns69 Posted May 6, 2008 Share Posted May 6, 2008 I too had the same problem. I used the following code before calling the exporter.exportReport() function. Hope this solves your problem too. Please let me know if it worked or not. Code:exporter.setParameter(net.sf.jasperreports.engine.export.JRXlsExporterParameter.IS_FONT_SIZE_FIX_ENABLED,Boolean.TRUE); Link to comment Share on other sites More sharing options...
imams Posted May 9, 2008 Author Share Posted May 9, 2008 Thanks for your advise. I tried same, but still problem remains. I think your code snippet would make the font-size to fixed. However, the problem is not with word wrap entirely; it's breaking words to lines which is good. The problem is the last line in cell is NOT entirely visible, but gets cut down. I feel this is caused due to FIXED Row Height. Any thoughts? Link to comment Share on other sites More sharing options...
ns69 Posted May 10, 2008 Share Posted May 10, 2008 Sorry, my bad. Try and change the vertical align to "Top" and see if that helps. Link to comment Share on other sites More sharing options...
ns69 Posted May 10, 2008 Share Posted May 10, 2008 Also try this: Code:exporter.setParameter(net.sf.jasperreports.engine.export.JRXlsExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE); Link to comment Share on other sites More sharing options...
imams Posted May 12, 2008 Author Share Posted May 12, 2008 Na, unfortunately even this didn't work! I tried 'Vertical' & your code snippet. Any more bright sparks? :) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now