当前位置:网站首页>Jimureport building block report - expression introduction
Jimureport building block report - expression introduction
2022-06-24 04:40:00 【JEECG】
Preface : We often use expressions in report design , As in the excel The same formula used in , With expressions, our report design will get twice the result with half the effort .
What expressions does the building block report contain ?
The building block report perfects the original expression , On the basis of the original , Extended dataset expression 、 Cell expression 、 Statistical function 、 Line number function 、 Date function 、 Mathematical functions 、 String function 、 Conditional expression 、 Color expression 、 Judgment function , Basic operator functions and system functions . Let's take a look at which expressions are included and their usage .
1. Dataset functions
The dataset function contains sum( Sum up )、average( averaging )、max( For maximum )、min( For the minimum ) And basic operators (+-*/)
Example : With sum For example
- =sum(#{jm.money},#{jm.extend_money}) You can sum multiple columns
#{jm.money} # Represents a dataset jm It's a collection
${jm.money} $ Represents a dataset jm It's an object ( Single data )
2. Cell functions
Cell functions also contain :sum( Sum up )、average( averaging )、max( For maximum )、min( For the minimum ) And basic operators (+-*/)
Example : With sum For example
- =sum(C6) Yes C6 Cell summation , If C6 A cell is an expression such as ${db.count}, Sum all data looped out of the page expression
- =sum(A6,C6) Yes A6 and C6 Cell summation
- =sum(A6:C6) Yes A6 To C6 Cell summation
3. Statistical function
The statistical function contains dbsum( Sum up )、dbmax( For maximum )、dbmin( For the minimum )、dbaverage ( averaging )
Is to specify a field for a specified dataset , Calculate all data in this field
for example dbsum contrast sum Function difference :dbsum Statistics set all data ,sum Only current page data is supported
Example With dbsum For example
- =dbsum(jm.money)
4. Line number function
Line number function : Self incrementing sequence number is realized through line number function
Example :
- =row()
- Multiple lists require line numbers , You need to set a number Parameter distinguishing counter, e.g :=row(1) =row(2)
5. Date function
The date function contains date( Get date )、time( Get time, minutes, seconds )、year( Year of acquisition )、month( Get the month )、day( Get days )、now( Gets the long integer value of the current time )、nowstr( Get the current time string )
Example : With date For example
- =date("1982-08-09") Return date :1982-08-09 00:00:00
- =date("1982-08-09 10:20:30") Return date :1982-08-09 00:00:00
- aggregate :=date('#{jm.create_time}')
- object :=date('${jm.create_time}')
- Cell :=date(A1)
6. Mathematical functions
The mathematical function contains rand( Get random numbers )、round( rounding )、abs( Take the absolute value )、floor( integer )、ceil( integer )、trunc( integer )
Example : With round For example
- =round(3451251.274,0)
- =round(#{db.salary}, 2)
7. String function
The string function contains char(unicode Code or ascii Encoding conversion )、cnmoney( Conversion of amount in words )、concat( String splicing )、lower( Turn lowercase )、upper( Turn capitalization )、date_str( Date to string )
Example : With cnmoney For example
- =cnmoney(1.232) return : One yuan and twenty-three cents
- aggregate :=cnmoney(#{jm.money})
- object :=cnmoney(${jm.money})
- Cell :=cnmoney(A1)
8. Conditional expression
Conditional expressions are used to make conditional judgments on data , contain case、if
Example :
- =case('#{dd.sex}'=='1',' male ',' Woman ')
- =case(1==1,1,2) ->1
- =(let sex= '#{dd.sex}'; if(sex== '1'){ ' male ' }elsif(sex== '2'){ ' Woman ' }else{ ' Unknown ' })
- =(if(A1==1){return (A1+B1)*200;})
9. Color expression
The color expression contains :color( Cell font / The background color )、=rowcolor( Whole line font / The background color )
Example : With color For example
- aggregate :=color('#{jm.salse}','#ffffff','#171516')
- object :=color('${jm.salse}','#ffffff','#171516')
- Cell :=color(A1,'#ffffff','#171516')
- Fixed value :=color('2','#ffffff','#171516')
10. Judgment function
The judgment function is to judge the data ; contain istime( Time judgment )、isdate( Period judgment )、isnumber( Digital judgment )、intval( If the parameter is empty, the default value is returned 0)、strval( If the parameter is empty, the default value is returned nil)
Example : With istime For example
- =istime("10:20:30") return true
- =istime('#{jm.create_time}')
- =istime('${jm.create_time}')
- =istime(A1)
边栏推荐
- Apipost interface assertion details
- event
- 近两周ACM之DP总结
- SAP mts/ato/mto/eto topic 7: ATO mode 1 m+m mode strategy 82 (6892)
- Congratulations to Zhong Jun for becoming the maintainer of chaos metric model working group
- How to file ECS? What should be paid attention to when selecting ECS
- After purchasing Tencent ECs, how to solve packet loss in Internet access?
- What are the advantages of ECS? Is ECS better than VM?
- TCPIP协议详解
- ribbon
猜你喜欢

编译器是如何将芯片执行的第一个指令放到芯片起始地址的?

SAP mts/ato/mto/eto topic 7: ATO mode 1 m+m mode strategy 82 (6892)

ServiceStack. Source code analysis of redis (connection and connection pool)

Facebook internal announcement: instant messaging will be re integrated
Summary of Android interview questions in 2020 (intermediate)

Opengauss version 3.0 source code compilation and installation guide

Weibo International Edition changed its name to Weibo light sharing Edition

Application practice | Apache Doris integrates iceberg + Flink CDC to build a real-time federated query and analysis architecture integrating lake and warehouse

What is etcd and its application scenarios

The results of the 2022 open source summer were announced, and 449 college students will contribute to open source projects
随机推荐
Abnova多肽设计和合成解决方案
Go language Chanel memory model
Go operation mongodb
Web penetration test - 5. Brute force cracking vulnerability - (6) VNC password cracking
web渗透测试----5、暴力破解漏洞--(8)PostgreSQL密码破解
apipost接口断言详解
Integration of Alibaba cloud SMS services and reasons for illegal message signing
The official overclocking tool of Intel XTU supports win11 22h2 and 13th generation core Raptor Lake processors
Two most practical methods for cadence OrCAD capture to batch modify network names graphic tutorial and video demonstration
我与物联有个约定
编译器是如何将芯片执行的第一个指令放到芯片起始地址的?
Worthington木瓜蛋白酶化学性质和特异性
数据库解答建标,按要求回答
Web penetration test - 5. Brute force cracking vulnerability - (8) PostgreSQL password cracking
How does ECS select bandwidth? What types of servers do you usually have?
SAP MTS/ATO/MTO/ETO专题之七:ATO模式1 M+M模式策略用82(6892)
How does the compiler put the first instruction executed by the chip at the start address of the chip?
外网访问svn服务器(外网访问部署在云上的svn服务器)
Summary of Android interview questions in 2020 (elementary)
梯度下降法介紹-黑馬程序員機器學習講義