The exemplary design parameters FineReport

1. fuzzy query

Fuzzy query using sql keyword plus wildcard "_" , "%" and other combinations query. Support for Oracle, MySql, SqlServer.

1) "%": represents any zero or more characters, support for Oracle, MySql, SqlServer.

Select * from table where column name like '%' // check out all   

Select * from table where column names like 'x' // exact match queries  

Select * from table where column name like '% x' // the right of x, can be preceded by any characters  

Select * from table where column names like 'x%' // left as x, the back can have any characters  

Select * from table where column name like '% x%' // intermediate as x, can have an arbitrary bit about the character 

2) "_": represents a single character, support Oracle, MySql, SqlServer.

Select * from table where column names like '_x' // right is x, preceded by a character 

Select * from table where column names like '__x' // right is x, preceded by two characters  

Select * from table where column names like 'x__' // left is x, followed by the two characters 

3) "[]": parentheses represents a character of the listed

Specify a character string or the scope of the claims to be matched to any one of them.

Note: If [there is] within a range of characters (01234, abcde and the like) can be abbreviated as "0-4", "ae"

sqlserver

Select * from table where column names like '[Zhang Li Wang] three' // will identify "John Doe", "Lee III", "King III" (rather than "Zhang Li Wang Three");  

Select * from table where column name like 'old [1-9]' // find the "old one", "old 2", ......, "old 9";

the Oracle
the SELECT * from table where regexp_like (column name, '[Zhang Li Wang] three') 

mysql

select * from table where column names rlike '[Zhang Li Wang] three' 

select * from table where column names regexp '[Zhang Li Wang] three'  

4) special characters fuzzy query

sqlserver

With [] comprising the special characters: select * from table where column name like '_ [%] _'  

mysql

With \ to escape special characters: the SELECT * from table where column names like '_ \% _' 

oracle

With the escape key escaping special characters: select * from table where column names like '_ \% _' escape '\'  

Fuzzy query 5) ACCESS is rather special '?', '*'. The Select * from table where column name like '* b *'

Table 2. Dynamic and dynamic conditions

1) Dynamic Table: SELECT * FROM $ {if (table = 'Order', 'Order', 'volume')}

 

 2) dynamic conditions

SELECT * FROM 销量 where 1=1 ${if(len(name)==0||len(value)==0,"","and "+name+"='"+value+"'")} 

3. Parameter references

Summary: The effect parameter is filtering data, dynamic header, different values ​​depending on the parameter values ​​and the like

1) dynamic title

Enter the formula = $ Area + "Sales"

4. All selected parameter is empty

In two ways:

1) Set the parameters panel properties

Click on the panel parameter space, the property right, the setting does not display the contents of the report before uncheck click the query

2) Select all empty set parameters 

Parameter setting data sets: SELECT * FROM line where 1 = 1 $ {if (len (area) == 0, "", "and the owner region = '" + area + "'")}

Set the report parameters: if (len ($ area) == 0, nofilter, $ area)

 The profile data set filter parameters

We must follow the naming rules

1) can not start with a digit, $ symbol.

2) variable names only letters (az AZ), numbers (0-9), the underscore (_), (@) or a combination of Chinese, and can not contain spaces between.

3) Variable names can not contain * -?. And other characters and spaces.

4) You can not use variable names reserved words of a programming language. For example, lowercase true, false and other reserved words. But uppercase TRUE, FALSE can.

Classic naming rules

1) Hungarian notation

This nomenclature is in front of each variable name plus a number indicating the data type character. The basic principle is: variable name = type + object + attributes described. The i represents int, the variable i at the beginning of life are all expressed int. s represents String, all variables are ordered beginning s represents a variable of type String.

2) Camel nomenclature

正如它的名称所表示的那样,是指混合使用大小写字母来构成变量和函数的名字。驼峰命名法跟帕斯卡命名法相似,只是首字母为小写,如userName。因为看上去像驼峰,因此而得名。

3)帕斯卡命名法,即pascal命名法

做法是首字母大写,如UserName。

注意事项

1)字符参数有英文单引号'${adce}',数字参数没有英文单引号${adce}。其中adce为参数。

2)参数值的引用格式为参数前面加$符号,如$adce。

3)模板参数与全局参数重名时,采用模板参数。

Guess you like

Origin blog.csdn.net/Artemis1220/article/details/90709812