Successfully!

Error!

Custom Empty Data Tips For A Single Chart

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

    1. Application scenarios

    When the chart has no data, customize the prompt content for the chart.The setting method in Custom Empty Data Prompt of Chart  will be applied to all the charts, not for customizing the prompt content when the data of a single chart is empty.

    1.gif


    2. Implementation ideas

    Insert charts and custom prompt pictures during report design, and use conditional attributes to control the hiding and display of charts and pictures.

    II. Example

    1. Data preparation

    Create a New General Report, create a new dataset ds1, the database query statement is: SELECT * FROM Sales_Volume where Region='${Region}'

    1.png


    2. Report design

    1) The report is designed as shown in the figure below, and the area where the picture is inserted should be the same size as the area of the column chart.

    Note: The picture here is customized and can be replaced by yourself.

    2.png

    2) Bind the column chart data as shown below:

    3.png

    3) Select the column chart and set the condition attribute Row Height. When ROWCOUNT("ds1")=0, the row height is 0.

    4.png

    4) Select the picture and set the condition attribute Row Height. When ROWCOUNT("ds1")>0, the row height is 0.

    5.png

    5) Setting the parameter panel, the data dictionary of the drop-down box of the Region parameter is set as follows:

    6.png


    3. Effect preview

    1) PC :

    Save the report, click the Pagination Preview, the effect is shown in the following figure:

    2.gif2) 2) Mobile :

    III. Template download

    The completed template can be found in:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Primary\Chart\Custom Empty Data Tips For A Single Chart.cpt

    Click to download the template:

    Custom Empty Data Tips For A Single Chart.cpt

    Custom picture download: 

    Custom picture.png


    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback