Successfully!

Error!

Display Cell Content

  • Last update:  2020-12-01
  • I. Overview

    1) In addition to the incerted cell elements mentioned in Insert Cell Elements, the cell content can also be HTML and binary data. 

    2) The scenario in this article requires a database that supports storing binary data. The sample database is MYSQL 5.6.31.

    You will learn
    • Display by Default

    • Display by Image

    • Display the binary content by download link

    • Display by HTML

    II. Steps

    1.Create JDBC data connection

    1) Connect to runoob, a local MYSQL database. For the way of connection, see Connect to MySQL.

    2) Define data connection as MYSQL.


    2.Create a new dataset [ds1]

    1) Create a new DB query dataset.

    2) Drag the table [image] into the DB query.

    3) The table [image] has three fields: [id], [file] and [description]. [id] is the primary key of int format. [file] stores pictures in BLOB format. [description] stores picture descriptions in varchar format.


    3.Drag the three data columns of [ds1] into B2~D2

    Set them as central alignment and add borders.


    4.Click [Cell Attributes]>[Other] to choose [Show Content]


    5.Display by Image

    1) Select C2, click the drop-down box and choose Display by Image.

    2) For other cells, the [Show Content] remains to be Display by Default.

    3) When the [Show Content] is set as Display by Default, the designer will automatically identify the way to display the contents of the cell based on the inserted cell elements.


    6.Preview the effect


    7.Display the binary content by download link

    1) Select C2, click the drop-down box and choose Display the binary content by download link.

    2) File Name for Download: =D2+'.png'.


    8.Preview the effect

    Click the link to download image files directly.

    9.Merge B1~D1

    10.Display by HTML

    1) Select merged cells and insert the text below:

    <span style="font-size:27px;font-family:Meiryo;">
      <u>
        <em>
          <strong>FineReport</strong>
        </em>
      </u>
    </span>
    <span sytle="font-size:16px;font-family:Meiryo;">
      FanRuan Co., Ltd.</span>  
    <span style="font-size:13px;font-family:Meiryo;">
      <br />
    </span>  
    <span style="color:rgb(255,0,0);font-size:13px;font-family:Meiryo;">
      Acknowledged by IDC and 1000+ Clients
    </span>  
    <span style="font-size:13px;font-family:Meiryo;">
      China's No.1 Reporting Software
    </span>

    2) click the drop-down box and choose Display by HTML.


    11.Preview the effect


    Attachment List


    Theme: Designer and Upgrade
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback