How Excel Interactive reports do

Source: Internet
Author: User
Tags php code first row tomcat tomcat server

to develop an interactive query system that allows employees to query the data reports on the company's servers at their respective computer terminals, the most tedious and time-consuming task is to write a web-based display, query, and entry page based on the jsp/asp/php code, which not only develops efficiently, but also maintains a large workload. This time, with the help of Finereport V8.0, complete the use of the Drop-down list box to select the region, according to the selected area of the region to display the fruit sales of the stores of data reports and charts (Figure 1).

1. Data Advance

Any report or chart is inseparable from the data, which utilizes the existing data in the Excel table. First, copy the Excel table that contains the data to the Webreportweb-infreportlets folder in the Finereport V8.0 installation directory. Run Finereport V8.0, select the server → server data set menu, click the Green "+" button in the pop-up window, select "File DataSet", double-click the dataset, name set to "store sales Statistics", file type select Excel, File address Select the Excel file that you want in the Reportlets folder, check the "First row contains column headings", click the "Preview" button, and if there is no problem, OK (Figure 2).

2. Report Design

After the data connection is set up, it is time to design the report. In the report editing area, select the A2:b2 cell to merge, right-click the cell, select the cell element → insert slash menu, and write in the text edit box of the pop-up slash Edit dialog box to include in the slash: Fruit | store | area, adjust the position of the text by adding spaces; in C1: H1 column Enter each fruit name and set the style; Select Server DataSet on the left of the DataSet Management panel. Expand the added store sales statistics, drag the corresponding field name into cell a2:h2, enter average in cell B3, select C3 cell, and click "+" at the right insertion. button, select "Insert Formula", select "AVERAGE" in the name of the Formula Definition dialog box that pops up, enter C2 at the formula editor, make sure, then display "=average (C2)" At C2, right-click Drag to fill H2, and select A1:h2, Use the toolbar to add borders to these cells (Figure 3).

3. Chart add

After the report design is complete, click the "insert → suspend element → insert Chart" menu, in the pop-up window of the chart type Select column chart, on the right side of the Chart Properties window, click on the "Type" tab, select the desired type of layout; Click the Data tab, select cell data from the data source, enter the category axis at the =b2 ", click" + "in the series name, enter" =C1:H1 "at the series name, enter" =C2:H2 "at the value, click on the Styles tab, enter the title in the Title tab below and format it, and in the Tabs tab, tick" label "and" Value "below; click" Effects " tab, check the dynamic display, series drag, and chart scaling in its interactive properties tab (Figure 4).

4. Add Interactive controls

After the report, the chart design is finished, to make the report interactive, add the interactive controls. Click the pen button in the parameters panel to drag and drop the Label control, Drop-down box control in the Control Panel, and the query control in the predefined control. Select the Label control, and in the property panel on the right, set the label's control value to "region". and set a good font, font size, etc. select the Drop-down box control, in the property panel click on the Data Dictionary button, in the pop-up dialog box type settings to select "Data Query", the data set to select "Store sales Statistics", the actual value of the selection " Region, displays the value by selecting region, which enables you to add the locale field value to the Drop-down list box (Figure 5).

Click the Pen-like button to exit the parameters panel. Select cell A2 in the report editing area, click on the "Filter" tab in the right panel, select "Region" at the optional column in the pop-up window, select "Equals" At the operator, click on the right button to select "Parameters" and enter "$comboBox 0" (comboBox0 for the Drop-down list box control name), click " Add "button to determine, so that when the list box is selected, click the" Query "button to display the contents of the query (Figure 6).

Finally, save the file to the installation directory in the Webreportweb-infreportlets folder, named Workbook1.cpt, preview, no problem.

5. File Publishing and Access

Report WORKBOOK1.CPT to the extent that it can be accessed, you need to configure the local server for publishing. Install the Tomcat server program, copy the Webreport file under the finereport_8.0 installation directory to%tomcat_home% WebApps, and launch Tomcat to publish successfully. Then, create a shortcut to the URL "HTTP://IP: Port/Webreport/reportserver?reportlet=123%2fworkbook4.cpt&op=view", and send this shortcut to each employee's desktop. You can click the Access query.

Small tip:

The default port for Tomcat is 8080, and Tomcat will not start if the port is occupied. Then you need to reconfigure the port, just modify the%tomcat_home%confsever.xml.

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.