Overview
Version
Report Server Version | Functional Change |
---|---|
11.0.9 | Added the Export Watermark and Edit Protection functions in Word. |
11.0.13 | 1. Optimized the Preview Only function in Word, disabling you to copy the cell content in the exported files. 2. Supported formulas used for file and worksheet passwords in exported Excel/PDF/Word files if Formula Supported During Password Setting is ticked under Template > Export Attribute > Common. |
Function Description
In daily work, to protect the file content and address data security needs, you often need to use watermarks and the read-only mode for the exported Word files. The Export Watermark and Edit Protection functions are added to FineReport, providing solutions for you to protect data security. You can choose Template > Export Attribute on the designer menu bar and select Word to enter the setting page, as shown in the following figure.
Function Overview
Function | Function Description | |
---|---|---|
Export Setting | Export at Unfixed Row Height | If you export a template as a Word file through the default setting in FineReport, a fixed row height will be set for cells. As a result, the row height of the table will not be automatically adjusted after line breaks when you perform secondary editing on the exported file. In this case, you can tick Export at Unfixed Row Height in WordExport Attribute to determine whether the row height can be adjusted in the exported Word file as needed. For details, see Automatic Row Height Adjustment for Exported Word Files. |
Content Protection | Edit Protection | If you tick Edit Protection, Sheet Password and Preview Only will appear on the setting page. Since the two options are both used for sheet password setting, you just need to select one of the two options. Edit Protection is deselected by default. If you tick Edit Protection, Sheet Password will be selected by default. Sheet Password allows you to set a sheet password for the exported Word file. Only those who know the password can edit the cell content. If you select Preview Only, the exported files cannot be edited. In FineReport 11.0.13 and later versions, you cannot copy the cell content in the exported Word files. |
Export Watermark | If you tick Export Watermark, watermarks will appear in the exported Word file. ![]() |
Application Scope for Export Watermarks
1. The Export Watermark setting only applies to the Print Layout mode in Word and is not supported in WPS.
2. You can export files using the following methods: exporting Word files by the toolbar in CPT reports, export events, URL export, API export, custom JS export, designer export, and exporting as email attachments.
3. The function is not supported on mobile terminals.
Example One
Template Opening
Open the template GettingStartedEN.cpt in %FR_HOME%\webapps\webroot\WEB-INF\reportlets.
Watermark Setting
1. Choose Server > Platform Management and log in to the decision-making system, as shown in the following figure.
2. Choose System Management > Security Management > Watermark Setting, and enable Watermark Setting. Select Custom Formula for Watermark Content, enter ="123", set Watermark Color to red, set Font Size to 30, set the horizontal spacing to 200, set the vertical spacing to 100, and click Save, as shown in the following figure.

3. Choose Template > Watermark in the designer, select Use Server Settings, and click OK, as shown in the following figure.
Export Attribute Setting
Choose Template > Export Attribute in the designer, select Word, tick Export Watermark and Edit Protection, select Preview Only in Edit Protection, and click OK, as shown in the following figure.
Effect Display
1. Save the template and select Pagination Preview. After you click Query, choose Export > Word on the toolbar, as shown in the following figure.
2. Open the exported file in the Print Layout mode of Word. You can see that the exported file contains watermarks and is protected from editing, as shown in the following figure.
Example Two
Report Opening
Open the template GettingStartedEN.cpt in %FR_HOME%\webapps\webroot\WEB-INF\reportlets.
Watermark Setting
The setting method is the same as that in the above section "Watermark Setting."
Export Attribute Setting
Choose Template > Export Attribute in the designer, select Word, tick Export Watermark and Edit Protection, select Sheet Password in Edit Protection, enter 123456 in Sheet Password, and click OK, as shown in the following figure.
Effect Display
1. Save the template and select Pagination Preview. After you click Query, choose Export > Word on the toolbar, as shown in the following figure.
2. Open the exported file in the Print Layout mode of Word. You can see that the exported file contains watermarks and is protected from editing. If you click Stop Protection, you can enter the sheet password that has been set to edit the file, as shown in the following figure.