Word export header and footer

  • Last update:  2021-04-07
  • I. Overview

    When exporting the report, if the export type is Word export and there are header and footer settings in the report, you need to export the header and footer to Word at the same time.

    II. Example

    1. Template settings

    Create a new template, and the report style is as shown in the figure below :


    2. Header and Footer Settings

    Set the header for this template: FineReport, which is displayed in the center, as shown in the figure below. For the detailed setting process, please refer to Header and Footer


    Note: The header and footer support a mix of multiple elements, such as strings, pictures, line breaks, etc., are all placed in the header and footer.


    3. Save and Preview

    The renderings are as follows:

    3.png


    4. Export Word from B/S side

    Click Export>Word in the toolbar on the Web side. After the output is successful, open Word, and you will see that the exported Word contains a header, as shown in the figure below:


    III. Matters needing attention

    1. More blank lines after Word export

    1) Problem Description

    The template has a header and footer. The exported Word has one more blank line on each page except for the first page, as shown in the following figure:

    2) Cause analysis

    The default distance of the header in Word is 12.7 mm from the top, which corresponds to the margin of FineReport.

    The height logic of the page margins and headers is different between the two. After exporting Word, the report content may be squeezed down by the header and cause the display to move down or disconnect.

    3) Solution

    Click the menu bar Template>Page Setup>Page, set the top margin to 12.7mm, as shown in the figure below:

    At this time, when previewing and exporting Word, the top distance of the header is the same, so the export result is consistent with the preview result.


    2. Blank pages appear after Word is exported

    1) Problem description

    After the page margin is adjusted to 12.7mm, there are still blank pages in the exported Word.

    2) Cause analysis

    Generally, the page is stretched due to the addition of pictures in the header and footer.

    3) Solution

    When adding headers and footers, choose to add Background > Image instead of adding Image directly. As shown below:


    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy