Successfully!

Error!

[General] Mobile Terminal Self-adaption

  • Last update:  2021-12-13
  • I. Overview

    1. Version

    Mobile version
    App 9.0


    2. Application scenarios

    When the report made on the PC is viewed on the mobile phone, the self-adaption effect provided by FineReport by default is not satisfactory. For example, the report is relatively large, it is shrunk very small on the phone, the font is blurred, etc.

    At this time, you can manually control the display effect of the report on the mobile terminal through the self-adaption option in the mobile attribute.


    3. Function introduction

    Set the self-adaption attributes of the mobile terminal to control the display effect of the report on the mobile terminal.

    Note: After the mobile terminal self-adaption attribute setting is completed, it will only take effect on the HTML5 terminal and the App terminal.

    II. Introduction to Self-adaption

    1. Setting method

    1)General report

    In the general report, click Template>Mobile Attribute, as shown in the figure below:

    1.png

    Note: If there is content in the template, if you check the Set as mobile canvas size button, it will trigger the save as a template with "_mobile" as the suffix. You can refer to Setting the mobile phone template

    2)Dashboard

    • In the dashboard, select a report block and click on the Mobile Terminal, as shown in the figure below:

    2.png

    • Or click Template>Mobile terminal properties, it can be set as a mobile terminal exclusive template. As shown below:

    3.png


    2. Description of mobile terminal template

    The description of the mobile terminal template is shown in the following table:

    Report typeRemarks
    General reportClick Template>Mobile Attribute, check the Set as mobile canvas size button, the report will be adapted based on 4.7-inch screen mobile phones, zoom in mobile phones above 4.7 inches, and compress mobile phones below 4.7 inches
    Dashboard

    Click Template>Mobile Attribute, check the Set as mobile template button, the canvas size (375*560), the width can be locked, and the height can be customized and modified.

    Similar to general reports, dashboard will also be adapted based on mobile phones with 4.7-inch screens. Mobile phones with a 4.7-inch screen and above will be zoomed in, and mobile phones with a 4.7-inch screen and below will be compressed.


    3. Scaling logic

    The vertical and horizontal self-adaption rules can be controlled separately, and the rules on the Pad adopt the horizontal screen settings.

    Self-adaption attributes include: Horizontal Fit, Vertical Fit, Non-adaptive, and Bidirectional Fit. The specific instructions are shown in the following table:

    Self-adaption attributes
    DescriptionApplication scenarios
    Horizontal FitThe report fills the screen horizontally and keeps the original aspect ratio of the report unchanged.It is mainly for the situation where the last page is very large after parameter query.
    Vertical FitThe report fills the screen vertically and zoom out if large, zoom in if small.Mainly for the case where the table is relatively wide, do not want to leave blank vertically.
    Non-adaptiveIt is shown the original size of the report.It is mainly for the case where the table is large or wide, or frozen setted.
    Bidirectional FitThe width and height of all cells can be stretched or shrunk simultaneously to fill the entire component.It is only suitable for the case of less than one screen and not more than one screen. If the template exceeds one screen by a lot, or if it is paged, the bidirectional fit is not applicable.

    Note: Some mobile phone models may have the problem of "horizontal fit" not taking effect. At this time, the user can increase the height of the cell in the template to ensure that the vertical height can fully display the text content after the horizontal fit.

    III. Examples

    Note: For the mobile terminal preview method, please refer to The mobile terminal template preview

    1. Auto-negotiation is not set

    1) Preview %FR_HOME%\webapps\webroot\WEB-INF\doc-EN\reportlets\demo\basic\graphical display progress bar.cpt template on the mobile terminal, the effect is shown in the following figure:

    2)Set vertical self-adaption

    • It can be found that the default effect shrinks the report to a small size and the font is a little fuzzy. You can set the vertical screen adaptive rule, for example, click Template>Mobile Attribute>Vertical screen-Vertical Fit, as shown in the following figure:

    5.png

    • Preview the template on the mobile terminal, the effect is shown in the figure below:

    IV. Pad component title font size adaptation

    1. Version


    Report server versionApp versionHTML5 mobile terminal display pluginSupport function
    10.010.4.61V10.4.61The title font size of the mobile template component on the Pad automatically adapts to the device


    2. Scope description

    In the previous version, the template title on the Pad could not be self-adaption. When the user uses the Pad to view the template, the component title font size in the template is too small, which will affect the template experience on the mobile terminal. If the Version requirements of chapter IV.1. of this article are met, the title font size of the mobile template component on the Pad will automatically adapt to the device.

    The scope of this function is described in the following table:

    Mobile deviceEffective rangeTerminal rangeComponent type
    PadForm re-layout, form retain layoutAPP, H5Tab block title, report block title, chart block title

    Attachment List


    Theme: Fine Mobile
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback