shamphadtale Posted September 16, 2011 Share Posted September 16, 2011 Hello all,I want to auto adjust cell length (cell length should get increase when data length is increase) when i export jasper report to excel format. Please anybody let me know how to do this?It is possible with DynamicJasper. So I guess it should also possible in JasperReports. Link to comment Share on other sites More sharing options...
yyun Posted September 22, 2011 Share Posted September 22, 2011 shamphadtaleWrote: Hello all, I want to auto adjust cell length (cell length should get increase when data length is increase) when i export jasper report to excel format. Please anybody let me know how to do this? It is possible with DynamicJasper. So I guess it should also possible in JasperReports. You can set this two properties in the Jrxml, and set the isStretchWithOverflow to false: <property name="net.sf.jasperreports.print.keep.full.text" value="true"/> <property name="net.sf.jasperreports.export.xls.wrap.text" value="false"/> Link to comment Share on other sites More sharing options...
shamphadtale Posted September 23, 2011 Author Share Posted September 23, 2011 Thanks yyun!Setting isStreachWithOverFlow to false affects View of report. Viewer shows truncated data. If this property is true data get wrapped to next line, so showing whole data. I am using single Jrxml file and creating different kinds of report using JRSaveContributor. So how can i set isStreachWithOverflow to false only for Excel reports?When we open exported CSV file in Microsoft Excel, is it possible to provide auto resizing of cell to it by setting some property or by some java code?Regards,Sham P.Post Edited by shamphadtale at 09/23/2011 08:56 Link to comment Share on other sites More sharing options...
szaharia Posted September 27, 2011 Share Posted September 27, 2011 Hi,For the moment the autosize feature is not supported in JR. But it's already considered for the next JR releases.We'll let you know when the new functionality will become available.Thank you,sanda Link to comment Share on other sites More sharing options...
shamphadtale Posted September 27, 2011 Author Share Posted September 27, 2011 Thanks allot Sanda,It is realy good news for me /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gifIt will be great if this feature - autosize - will be applicable to CSV files also.Regards,Sham P. Link to comment Share on other sites More sharing options...
shamphadtale Posted December 5, 2011 Author Share Posted December 5, 2011 Hello Sanda,Is this - autoResize of cell as per data size - feature added in Jasper 4.13? If yes which properties I need to set at export time?Regards,Sham P. Link to comment Share on other sites More sharing options...
szaharia Posted December 5, 2011 Share Posted December 5, 2011 Hello Sham,The (row and column) autofit properties were not introduced in the 4.1.3 release, but in the present they are in the testing phase. They will be rendered fully functional in the near future.Other 2 resizing properties were made available in 4.1.3:net.sf.jasperreports.export.xls.column.widthnet.sf.jasperreports.export.xls.column.width.ratioMaybe one of these 2 will be helpful in resizing cells as you need, until the autosize will be part of the JR release.Hope this helps,sanda Link to comment Share on other sites More sharing options...
shamphadtale Posted December 5, 2011 Author Share Posted December 5, 2011 Hello Sanda,I have seen these properties and they are quite useful for me. So I was looking for autoResize(). Any way for now I will use them and once autoResize() come I will update my code with autoResize(). Thanks allot!Sham Link to comment Share on other sites More sharing options...
shamphadtale Posted December 13, 2011 Author Share Posted December 13, 2011 When I open exported CSV report in Microsoft Excel, data does not display properly. I need to use excel functionality Format ---> AutoFit Column Width for getting data display neatly. Does jasper report has some property by which column lengh get adjusted automatically when CSV report is open in Microsoft Excel? OR For CSV are there any similar properties like - net.sf.jasperreports.export.xls.column.widthnet.sf.jasperreports.export.xls.column.width.ratio Link to comment Share on other sites More sharing options...
szaharia Posted December 13, 2011 Share Posted December 13, 2011 Hi Sham,There are no equivalent properties for CSV format, because CSV files don't store such layout information. For instance, try to run Format ---> AutoFit Column Width for a column in a CSV file, save the modified CSV and close it. Open again the CSV file and see that the autofit setting is gone. If you try to manually set the column width, you'll get the same result.CSV are designed to store data only, any format setting is dropped when the file is saved.Regards,sanda Link to comment Share on other sites More sharing options...
shamphadtale Posted December 13, 2011 Author Share Posted December 13, 2011 Yeah, I checked as you told me, after reopening CSV file it is as before, I need to do formatting again.Thanks allot for your quick reply! Link to comment Share on other sites More sharing options...
shamphadtale Posted December 19, 2011 Author Share Posted December 19, 2011 Thanks allot Sanda 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