ikhatkhatay Posted May 30, 2023 Share Posted May 30, 2023 I am using Jaspersoft Studio v6.3.1.final to generate an Excel report.Multiple source data rows can be combined into one output rowThe detail row has a minimum row height of 50 pixelsAll cells on the detail row are contained in a FrameAll cells on the detail row are set to Stretch Type = 'Relative to Tallest Object'The "tallest" object in this report is usually Column B and its contents are populated through a formula-based variable. Although this variable acts on each source data row, all the source data rows which are combined into one output row have the same variable value.The Preview shows the row height adjusted to accommodate the "tallest" generated data (Column B in this case).However, the generated Excel report does not adjust the row height as expected. As a result, the generated data appears truncated (data is contained in Column B but the visual cuts off some of the lines/words).I am looking to understand why the generated Excel report does not expand the row height to accommodate the generated data as seen in the Preview. The documentation does mention that variable-based cells do not "resize" from the "initial value". In this Use Case, no "resizing" takes place; the "final value" is the same as the "initial value".Attached are the example template (JRXML and JASPER), example data source (JSON), and example Excel report (XLSX). Thanks! Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted June 1, 2023 Share Posted June 1, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
darth_fader Posted June 3, 2023 Share Posted June 3, 2023 The recommended fix in the wiki is to add the following property to each text field in the detail band - <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>https://community.jaspersoft.com/wiki/how-expand-excel-cell-height-dynamicallyI tested that out, works pretty well - see the attached file. Might be a way to do this on a group basis by adding those text fields to an element group or frame, didn't test that out. Link to comment Share on other sites More sharing options...
ikhatkhatay Posted July 10, 2023 Author Share Posted July 10, 2023 Thanks you so much, @darth_fader! The solution works for the report in isolation. However, I've been testing multiple Use Cases and am still running into the same issue. After additional investigations and troubleshooting, I discovered that the parent file contains an image and this somehow prevents the row height auto-adjust from working.I am attaching a ZIP file with the relevant files.Without logoWith logoPlease advise. 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