How to dynamically change the report's row height column width

Reporting application is sometimes necessary to control high dynamic row or column width to meet specific needs. The packet report for each packet requested height / width constant, so to be able to achieve the same paper to print page number of packets.

Run Dry report row high column width can be programmed in the expression property, thereby realizing a high dynamic row column width, using the procedure described below through an example.

1, connected to the data source

Run Dry report designer using connected data source comes DEMO

imagepng

2, setting data set

New Report and sets of data that, taking the number of used SQL

imagepng

Ds1 data set as follows:

SELECT STATE,EID,NAME,SURNAME,GENDER,DEPT,SALARY FROM EMPLOYEE

3, edit the report cell expression

Written report expression in the report template

imagepng

At this point, using a fixed-line report high display as follows:

imagepng

4, is provided a high dynamic rows

Since the packet is directly associated with each line of the high number of packets, so the height attribute written expression in the second row: 40 / ds1.count (STATE == A2), as shown below:

imagepng

Wherein ds1.count (STATE == A2) calculating the number (number of members) of the current group of rows.

After setting the height of the dynamic, the report preview is as follows:

imagepng

We can see the total height of each packet is fixed, but the details of the row height will change dynamically based on the number of members.

Examples of the above line were highly dynamic control, while in Run Dry report ranks are symmetric, in a similar manner may be provided by a dynamic column width. In short, Run Dry statements in virtually all cell properties can be dynamically controlled by writing expressions.

More reporting style related issues please see: report style classification issues related to navigation

Guess you like

Origin www.cnblogs.com/zozoxxma/p/11968987.html