Java Development Report--grid++report Report Designer

Source: Internet
Author: User

in order to make the data display more vivid, the report is almost very common in the project , but can be broadly divided into two categories :


         a,Graphics: Displaying data in a graphical form,such as bar chart,Line Chart,pie chart, etc.,here are a lot of tools for this.,For exampleJfreeCharts (UseJavalanguage implementation, relatively not too beautiful), Funsionchartsfree(usingXml+flash+jsimplementation, relatively good), you can refer to my previous article:Graphics Generation tool (Funsionchartsfree and Ifreechart); second, there areHighcharts(http://www.hcharts.cn/demo/index.php) andEcharts (Official website: http://echarts.baidu.com/doc/example.html), both are throughJSto achieve, is more recommended to use. The official website is very informative..

       Two, is the table, one can be exported to the dataExcelform that we can passPOI (features are more powerful and rich, but complex)and theJXL(easy to use, but complex functions are not possible); second, some statistical tables are used to count important information for printing. Javacommonly used in the Jasperreport+ireport, this online material is more, our project usesGrid++report,This Report Designer, support C/s development: VB.net, C #, VB, VC, Delphi and so on, b/S development: ASP, PHP, JSP, etc., support all Web servers, previously inC/Sof theVBused in development (report from unfamiliar to use), this time inJava Webused in, mainly by reference to the user manual, and the officialDemobe designed.

Design reports with Report Designer here no longer repeat, no Care header footer, report Header report end, detail grid and the use of various parts. Below is a simple example of a report;


1 , first of all, you need to design the GRF the report is placed under a path in the project, JSP page, refer to:

<script type= "Text/javascript" >//var installed = Install_detect (); Createdisplayviewerex ("100%", "80%", "${CONTEXTPATH}/ASSETS/GRIDREPORT/GRF/SELFGETNUMBER.GRF", "", True, ""); </ Script

This code requires the body inside,the default container for grid++report is the body the.


2 , using AJAX to access the data:

<script type= "Text/javascript" >function Getgriddata () {Ajaxreportviewerstart (ReportViewer, "${contextpath}/ Log/logregistration/griddata?starttime= ' 2014-10-12 ' &endtime= ' 2014-10-09 ');} </script>

3,AJAXThe data transmission format specifies:

<report><xml><row><CustomerID>BLONP</CustomerID><CompanyName> National Hao </ Companyname><contactname> Ann </contactname></row><row><customerid>cactu</ Customerid><companyname> Cargo Co., Ltd. </CompanyName><ContactName> Mr. Liu </contactname></ Row><row><customerid>centc</customerid><companyname> Industrial </CompanyName>< Contactname> Mr. Wang </ContactName></row><row><CustomerID>HUNGC</CustomerID>< Companyname> Hardware Machinery </CompanyName><ContactName> Mr. SU </ContactName></row><row>< customerid>merep</customerid><companyname> hua ke </CompanyName><ContactName> wu </ contactname></row></xml><_grparam><parameter1>value1</parameter1>< parameter2>value2</parameter2><staticbox1>text1</staticbox1><memobox1>text2</ Memobox1></_grparam></report> 

where row is the field in the schedule,_grparam is the parameter. It is important to note that the field name corresponds. As long as we use PrintWriter in the background write our good XML string.

Of course, I am just a simple example, in fact, the report development is similar, we need to look at the document, look at the official example is much better.




Java Development Report--grid++report Report Designer

Related Article

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.