Summary of the usage of common functions of the web report tool FineReport (Report function) and report finereport

Source: Internet
Author: User

Summary of the usage of common functions of the web report tool FineReport (Report function) and report finereport

Note: In this summary, tableName or viewName is used as the parameter factor. When a function is called, it is first searched from the private data source and then from the public data source.

 

CLASS

CLASS (object): return the CLASS to which the object belongs.


CNMONEY

CNMONEY (number, unit) returns in uppercase.

Number: number of numeric types to be converted.

Unit: unit, "s", "B", "q", "w", "sw", "bw", "qw", "y", "sy ", "by", "qy", "wy" represent "pick up", "fail", "fail", "Ten Thousand", "Ten Thousand", "Hundred Thousand ", "tens of thousands", "hundreds of millions", and "trillions ".

Note:

The unit can be null. If it is null, the number is directly converted to RMB in upper case. Otherwise, the number is first multiplied by the hexadecimal number of the unit, and then the result is converted to RMB in upper case.

Example:

CNMONEY (1200) is equal to yundun.

CNMONEY (12.5, "w") is equivalent to the round of Yuan.

CNMONEY (56.3478, "bw") is equivalent to the round of Wu Xiaolu's tens of thousands of consumers.

CNMONEY (3.4567, "y") is equal to Yuan in the world.


COL

COL () returns the column number of the current cell.

Example:

If the current cell is A5 and "= col ()" is written to A5, 1 is returned.

If the current cell is C6, 3 is returned if "= col ()" is written to C6.


COLCOUNT

COLCOUNT (tableData): returns the number of columns in tableData.

TableData: The name of tableData, In the string format.

Note:

Search from the private data source and then from the public data source. The number of columns in the first queried tableData is returned.

Example:

The following uses the data source FRDemo as an example.

COLCOUNT ("Check") is 6.

COLCOUNT ("country") is 5.


COLNAME

COLNAME (tableData, colIndex) returns the name of the colIndex column in tableData.

TableData: The name of TableData, In the string format.

ColIndex: column number.

Note:

TableData is first searched from the private data source and then from the public data source.

Example:

COLNAME ("Check", 3) is equal to AcceName.

COLNAME ("country", 4) is equal to Area.


EVAL

EVAL (exp): returns the result after the expression exp is calculated.

Exp: an expression string.

Note:

As long as the EVAL parameter exp can finally be converted into a string in the expression form, such as "sum (2, 4)", "2 + 7", it can be calculated.

Example:

EVAL ("2 + 5") equals 7.

EVAL ("count (2, 3)") is equal to 2.

EVAL ("sum" + "(2, 3, 5)") equals 10.

EVAL (IF (true, "sum", "count") + "(,)") equals 10.

EVAL (IF (false, "sum", "count") + "(,)") equals 4.


FIELDS

FIELDS (connectionName, tableName): returns the names of all FIELDS in the tableName table.

Example:

The database BASE contains a table named task. The content of the table is as follows:

Namestart end

A2008 2009

B20092012

Then FIELDS ("BASE", "task") is equal to [name, start, end].


FORMAT

FORMAT (object, format): returns the format of the object.

Object: the Object to be formatted. It can be a String, number, or object (commonly used Date or Time ).

Format: formatted style.

Note:

The format must be uppercase/lowercase in strict accordance with the rules in the preceding example. Month: MM in upper case, year: yyyy or yy, and day: dd in lower case.

You can use ''or" "to reference the format as a parameter factor.

Example:

Format (TODAY (), 'yyyy-MM-dd') returns


INMAP

INMAP (key, value, mapName): determines whether the data dictionary mapName contains a data pair whose key value is key and value is value. The return value is boolean. If yes, TRUE is returned. If no, FALSE is returned.

Key: The detected key.

Value: The detected value.

MapName: Specifies the data dictionary name.

Note:

MapName must be String type.

Example:

INMAP (1, 2, "mermerdic") returns Boolean. TRUE (Boolean ).


ISNULL

ISNULL (object): determines whether all values of an object are Primitive. NULL.


MAP

MAP (key, mapName): returns the value of the key in the data dictionary named mapName.

Key: the key in the data dictionary corresponding to the returned value.

MapName: Specifies the data dictionary name. Note that the data dictionary name must be enclosed by quotation marks.

Example:

MAP (1, "customername") is equal to "Yixing HongdaFood Co .".


RECORDS

RECORDS (connection, table, field): returns all elements in the field Name field in the table of the database table.

Example:

The database BASE contains a table named task. The content of the table is as follows:

Namestart end

A2008 2009

B20092012

Therefore, RECORDS ("BASE", "task", "end") equals to [2009,2012].

RECORDS (connection, table, field, row) returns the row record under the field in the table. The field can be a column name or a column number.

RECORDS ("BASE", "task", "end", 2) equals 2012.

RECORDS ("BASE", "task", 2009) equals.


REVERSE

REVERSE (value): returns the logical value opposite to the value.

Example:

REVERSE (true) is equal to false.


ROW

ROW () returns the ROW number of the current cell.

Example:

If the current cell is A5 and "= ROW ()" is written to A5, 5 is returned.

If the current cell is B8 and "= ROW ()" is written in B8, 8 is returned.


ROWCOUNT

ROWCOUNT (tableData) returns the number of rows of tableData.

TableData: The name of TableData, In the string format.

Note:

First, search from the private data source and then from the public data source. The number of rows returned is tableData.

Example:

The following uses the data source FRDemo as an example.

ROWCOUNT ("Check") is 3.

ROWCOUNT ("country") is 18.


TABLEDATAFIELDS

TABLEDATAFIELDS (tableData): returns the names of all fields in tableData.

Note:

First, query from the report data set and then from the server data set. An array consisting of the column names of tableData is returned.

Example:

TABLEDATAFIELDS ("country") equals to [name, capital, Mainland China, area, population


TABLEDATES

TABLEDATAS (): returns the report dataset and the name of the server dataset.]

Example:

Server datasets include ds1, ds2, and ds3. Report datasets include dsr1 and dsr2.

TABLEDATAS () is equal to [dsr1, dsr2, ds1, ds2, ds3].

TABLEDATAS (0) returns the name of the server dataset; TABLEDATAS (1) returns the name of the report dataset;

TABLEDATAS (0) equals to [ds1, ds2, ds3]; TABLEDATAS (1) equals to [dsr1, dsr2].


TABLES

TABLEAS (connectionName): returns the names of all tables in the database named connectionName.

Example:

Assume that the database FRDemo contains three tables: a, B, and c;

Then TABLES ("FRDemo") is equal to [a, B, c].


VALUE

VALUE (tableData, row, col) returns the VALUE of row and column in tableData.

TableData: The name of tableData, In the string format.

Row: the row number.

Col: column number.

Note:

Search from the private data source and then from the public data source. The returned value is the qualified value of tableData.

Example:

VALUE ("country", 5, 3) equals to South America.

VALUE ("Simple", 8, 3) is equal to jonnason.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.