Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Paging summarization has never been so simple

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Hi ~ everybody, are you still worrying about the sum of the data per page? Are you still worried about writing a long list of code and working late into the night? Are you still freaking out about Party A's changing paging needs? Stop! From now on, you will find that paging summary has never been so simple, come and follow in the footsteps of the little teacher to find out.

As we all know, there are often business requirements in business systems: data reports need to be displayed in pages according to actual paper, and the data on this page is summarized at the end of each page (for example, counting, summation). The following figure shows the subtotal of the freight charges per page:

The demand seems simple, but Party A's similar requirements may emerge one after another. How can we fix it once and for all? Here is the Messenger of Hell-dry the report to see how strong it is.

First of all, the first step is, of course, to make the report, as shown in the following figure:

The main configuration of the report:

Cell number expression

The report is an inventory report, so the A2 cell is counted by the select function, and the value is taken after B2.

Cell background color

The first line sets the background color to blue

The second line implements the interlaced heterochromatic effect by setting a dynamic background color expression:

If (row ()% 2) 4144960)

Display format

Set the display format of C2 order date to: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

Set the display format of E2 freight as: ¥# 0.00

Display value

Set the display value expression for B2 customer ID: ds2.select (company name, customer ID==value (), 1)

Then, the paging summary is done with the pcsum () function.

The specific operations are as follows:

1. Add two rows of data as subtotals and totals, and set the row type to the end of the report

two。 Configure the subtotal expression: = pcsum (E2 {}) and set the display format to: ¥# 0.00

Configure the total expression: = sum (E2 {}) and set the display format to: ¥# 0.00

Finally, let's review the problems encountered and the solutions:

[question] paging summary

[solution] the pcsum () function realizes the sum of paging subtotals. Smart you must have figured out how to achieve paging counting. Bingo~ is the pccount () function!

At this point, the paging summary requirement has been realized, isn't it so easy? Let his needs change, I have a simple function to do, come to pick to dry the report.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report