How Excel makes dynamic folding tree display data

Source: Internet
Author: User
Tags button type first row tomcat server

Example: The company fruit sales in accordance with the region, store, fruit classification statistics show, the same type of data folding together, the client wants to see where to click on the "+" number expand display (Figure 1).

1. Raw Data Preparation

In the last period we have taught you to use Finereport V8.0 software to implement interactive report method, this time we use the software to achieve another very different solution-folding data display. Again, you need to copy the Excel table that contains the data to the Webreportweb-infreportlets folder. After starting Finereport, select "Template DataSet" in the DataSet Management panel on the left and click on "+" button, select "File DataSet", enter "all kinds of fruit sales statistics" in the Name of pop-up window, file type select "Excel", File address Select the Excel file that you want in the Reportlets folder, check "First row contains column headings" In the settings, click "Preview" to view the effect, and then determine after no problem (Figure 2).

2. Design the user interface

In the report editing area, select the B1:l1 cell to merge, enter the title and set the style, and enter the report header content in the B2:l2 cell, and in the DataSet Management panel on the left, select "Template DataSet" to expand the "Sales statistics for all kinds of fruits" in the regional stores. Drag the field name to the appropriate cell. In order to see more clearly, the row height can be larger (Figure 3).

Right-click the B3, C4, D5 cell, select the Control Properties menu, select Button control in the pop-up window, select the tree node button at the button type, and the cell becomes the switch button for the tree node (Figure 4).

Right-click the C4 cell to select the Edit menu (or click the "Basic" button on the right) at the parent setting of the pop-up window, when the Zovig is selected, the Zovig is set to "B3" (that is, the cell at the top level of the store), and the data is set to "group" and the extension orientation is "portrait". Similarly, set the Zovig of the D5 cell to "C4" (Figure 5).

Right-click the E5 cell to select the Edit menu, select the Filter tab in the pop-up window, general Conditions optional column to select "Store", the operator to select "Equal to", on its right click to select "Cell", the content is "C4", click the "Add" button, and then select "Fruit" in the optional column, the operator at the selection " equals ", click on the right side to select" Cell ", the content is" D5 ", click the" Add "button, two conditions of the relationship is" and "(Figure 6).

3. Add a simple formula

For data statistics, you also need to add formulas to the report. In order to count the various types of fruit sales in each month, you need to select cell E4, click + at the insertion of the right panel, select Insert Formula, insert Formula "=sum (E5)", and then drag right to J4; Insert Formula "E3 (=sum)" in E4 cell Drag to the right to fill the J3 statistics of various regions of the fruits of the month sales; if you select K3 cells, insert the formula =sum (E3:J3), and drag down to the K5 cell to count the sales totals for all the months of each store and for each month of each fruit (Figure 7).

Finally, select the B2:k5 cell, and use the buttons on the toolbar to beautify it, plus the box line. Save the file to the Webreportweb-infreportlets folder under the installation directory, named WORKBOOK4.CPT, and preview it as a data analysis, no problem. Report WORKBOOK1.CPT to achieve the degree of access, first configure the Tomcat server, publish the table, and then the user can be used to access the fixed address.

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.