I. Description
After exporting Word with the default settings of FineReport, a fixed row height is used between the cells, which causes the table to not automatically adjust the row height after line wrapping when the user performs secondary editing on the exported result, as shown in the following effect:
So how to make Word can automatically adjust the line height when exporting for secondary editing?
II. Ideas
In FIneReport 7.0.5 and later versions, in Template>Export Attributes, the function of setting whether to fix the row height during Word export is added. Through this function, users can freely control whether the row height can be changed after Word is exported.
III. Examples
Open the template %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Primary\DetailReport\Details.cpt.
Paging preview directly, then click Export>Word, and edit the exported Word file twice. You can see the effect as shown in the above figure. The table row height cannot be adjusted, and the row height of the exported table is consistent with the FineReport template row height.
1. Export property settings
Go back to the template, click Template>Export Attributes, and select Unfixed row height export in the Word template export properties panel, as shown in the following figure:
2. Effect view
Save the template, click on the page to preview, export Word on the browser side, and then edit Word for the second time, you can see that the row height of the table will automatically change after the line break, as shown in the following figure:
Note: The displayed height of the rows that have not been edited is inconsistent with the height of the FineReport cell. This is because the row height is not fixed when exporting Word, so Word will automatically adjust the table height according to the font size.