Skip to main content

Chinese-style Reports Pro Template Instructions

1. Terminology

Term
Description
CellA cell is the intersection of rows and columns in a table, and it is the smallest unit that makes up a table. It can be split or merged. Individual data input and modification are performed in cells.

Unlike Excel, in Chinese-style Reports Pro, in addition to regular cells, there are also template cells.
Template CellTemplate cells are cells that can be expanded according to configured attribute rules.

Fields dragged from the view are automatically recognized as template cells, and regular cells can also be converted to template cells through right-click settings.
Template FieldTemplate fields are divided into four types: data fields, function fields, expression fields, and worksheet fields. For details, see [3. Template Fields](#3. Template Fields)

  • Data fields: Fields from the view can be dragged to the editing area to form expandable data;
  • Function fields: Excel functions wrapped in a pair of curly braces, supporting function references to data fields;
  • Expression fields: Expressions wrapped in a pair of curly braces;
  • Worksheet fields: Used for worksheet name binding.
  • Template AttributesSupports defining template attributes, including expansion direction, sorting, grouping, parent cells, filtering, etc. For details, see [4. Template Attributes](#4. Template Attributes)

    2. Template Cells vs Regular Cells

    Compared to Excel, Chinese-style Reports Pro introduces the concept of template cells, providing more powerful functionality beyond regular cells. For easy distinction, template cells have a blue corner marker in the bottom-left corner.

    Regular Cells: Regular cells maintain static data-carrying functionality similar to Excel cells, only used for storing fixed information, commonly used for headers, notes, prompts, etc.

    Template Cells: Allow users to flexibly expand according to preset attribute rules. They not only carry data but also embed template fields and template attributes, achieving dynamic report generation. Through template cells, Chinese-style Reports Pro greatly enhances the flexibility and efficiency of report creation, making complex and variable report requirements easy to handle.

    3. Template Fields

    Template fields are divided into four types: data fields, function fields, expression fields, and worksheet fields.

    3.1. Data Fields

    Data fields can be generated in two ways:

    Method 1: Automatic generation. Each field generated in the data preparation stage in each view can be manually dragged into the report template editing area during the template editing stage, and the system will automatically recognize and generate corresponding data fields.

    Method 2: Manual formula input. For data fields that require special processing or calculation, users can generate them by manually entering formulas. The formula format is {{view_name.field_name}}, where the view name and field name must be views and fields generated in the data preparation stage.

    3.2. Function Fields

    Type 1: Aggregate functions, formula format is {{=function()}}

    Supported aggregate functions are Sum, Count, Average, Max, Min, Product, StdDev, StdDevp, Var, and Varp.

    Supports referencing cells ({{ =SUM(F4) }}) or data fields ({{ =SUM(team.score) }}), only supports referencing one parameter

    Type 2: Other functions, formula format is {{==function()}}

    Supports most function formulas in Excel, does not support referencing data fields, only supports referencing cells, and will expand with data during template filling.

    For example: {{==VLOOKUP(F4,A1:G7,2,false)}}

    3.3. Expression Fields

    Expression fields can be used to perform calculations using operators +, -, *, /, and () with parameters referencing cells only.

    For example:

    {{=A15*0.01}}

    {{=A15+D15-G15}}

    {{=(A15+ A20)*0.3}}

    Note:

    • Expression fields cannot be used together with template attributes. For example: {{ =A18*0.05 (E=H) }}
    • Function fields and expression fields also temporarily do not support use together. For example: {{ =Sum(A5 + A6) }} or {{ =Sum(A5) * 0.01}}

    3.4. Worksheet Fields

    Supports using binding fields in worksheet names, meaning the field values of sheet names can be filled by data from the data source, and each sheet name displays data corresponding to its value.

    For example, if we specify {{dt.Region}} as the worksheet name and the data source contains data from 5 regions, the final report will contain 5 worksheets, and each individual worksheet will contain data for a specific region.

    6.png

    4. Template Attributes

    For template cells, two methods are supported for configuring cell dynamic attributes:

    • Method 1 (Recommended): Visual configuration. Double-click the template cell or right-click Properties menu > Dynamic Attributes to open the visual configuration window for attribute configuration.
    • Method 2: Supports manual attribute input in the formula editing area.

    8.png

    Attribute
    IntroductionDetailed Description
    Expansion (E Attribute)Implements vertical or horizontal dynamic expansion of cell data.[Expansion](1-Cell Dynamic Attributes-Expansion Practice.md)
    Parent Cell (C Attribute)After setting a parent cell for a template cell, a parent-child relationship is formed. Based on this relationship, when expanding in the final report, filtering or following effects are formed.[Parent Cell](2-Cell Dynamic Attributes-Parent Cell Practice.md)
    Grouping (G Attribute)Groups data in the template, configurable as merge grouping, repeat grouping, non-repeat grouping, and original grouping.[Grouping](3-Cell Dynamic Attributes-Grouping Practice.md)
    Sorting (S Attribute)Supports sorting template data, configurable as ascending, descending, and no sorting.
    Template attribute sorting priority > data preparation stage sorting. When sorting is set to no sorting in template attributes, data preparation stage sorting takes effect.
    [Sorting](4-Cell Dynamic Attributes-Sorting Practice.md)
    Filtering (F Attribute)For detailed data filtering scenarios or multi-view analysis scenarios, quickly retrieve and match required data. Supports selection, range, condition, and field four types.[Filtering](6-Cell Dynamic Attributes-Filtering Attributes.md)
    Layout (FM Attribute)Supports defining cell fill modes, configurable as additional rows/columns, overwrite writing, and format-preserving overwrite writing.[Layout](7-Cell Dynamic Attributes-Layout Practice.md)