Successfully!

Error!

Text Dataset

  • Last update:  2023-10-20
  • Overview

    Version

    Report Server Version

    11.0

    Application Scenarios

    Most system-generated log files are text files, such as files showing website browsing traffic and time span of each page.

    Thus, analysis of text files in the report system is important. You can import text files (as data source) through the text dataset.

    Functions

    Text dataset uses TXT files as data sources.

    You (as the admin) can use FineReport to present the data and perform data analysis with these files as data sources.

    Defining Text Dataset

    Preparing a Text File

    A TXT file consists of texts and some separators.

    Supported text encoding types (empty by default) include GBK, BIG5, ISO-8859-1, UTF-8, UTF-16, EUC_JP, EUC_KR, and CP850.

    Supported text separators include tab, space (default), comma, and other custom separators.

    For example, the prepared text file (no encoding format and comma as separator) is as follows.

    Name,Capital,Continent,Area,Population    
        Argentina,Buenos Aires,South America,2777815.00,32300003.00    
        Bolivia,La Paz,South America,1098575.00,7300000.00    
        Brazil,Brasilia,South America,8511196.00,150400000.00    
        Canada,Ottawa,North America,9976147.00,26500000.00    
        Chile,Santiago,South America,756943.00,13200000.00    
        Colombia,Bagota,South America,1138907.00,33000000.00    
        Cuba,Havana,North America,114524.00,10600000.00    
        Ecuador,Quito,South America,455502.00,10600000.00    
        El Salvador,San Salvador,North America,20865.00,5300000.00    
        Guyana,Georgetown,South America,214969.00,800000.00    
        Jamaica,Kingston,North America,11424.00,2500000.00    
        Mexico,Mexico City,North America,1967180.00,88600000.00    
        Nicaragua,Managua,North America,139000.00,3900000.00    
        Paraguay,Asuncion,South America,406576.00,4660000.00    
        Peru,Lima,South America,1285215.00,21600000.00    
        United States of America,Washington,North America,9363130.00,249200000.00    
        Uruguay,Montevideo,South America,176140.00,3002000.00    
        Venezuela,Caracas,South America,912047.00,19700000.00

    Uploading the Text File

    Text dataset supports two methods for calling text files. You can select as needed.

    1. Local file: Text files are stored under the path %FR_HOME%\webapps\webroot\WEB-INF\reportlets of the report project. (Files in other local directories are not supported.)

    2. Remote URL file: Text files are stored on a server. You can call the files by accessing their URLs.

    In this example, the created text file is stored under the path %FR_HOME%\webapps\webroot\WEB-INF\reportlets.

    Creating a File Dataset

    1. Click + and select File Dataset.

    2. In the text dataset setting page, select the text file to be added.

    In the Example text file (comma as separator), the first line is the column header. In the setting on the right side, you need to set according to the actual use. Others can be selected to customize the separator.

    iconNote:

     If you select URL, note the following points.

    1. Ensure that the report project can access this file, otherwise the call fails.

    2. If the URL contains Chinese characters, it should be encoded first. Enter the encoded URL on the platform to enable normal access.

    3. Click Preview. Then the data is dispayed as follows.

    4. After creation, the corresponding text dataset is added.

    Attachment List


    Theme: Data Preparation
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback