How to design a good report is displayed on the web

Run Dry statements used to develop for the desktop version, then after the report published in the java web development how-side rendering of reporting tools, web designer to end users are more concerned about the issue.

Run Dry statements end web publishing, using Taglib way, just introduced in the jsp tag library, call the specific label (eg, report: html) can be released, can be embedded in any jsp page.

Specifically how to do?

method one:

Under normal circumstances, the use of dry-run function comes Jsp available under the demo can be implemented directly publish reports. There are two jsp explain the differences and how to use:

1、 demo/reportJsp/preview.jsp

The jsp used to publish directly to the web within the design end of the preview, because the use of the jsp, the full path of the incoming url will report templates, so no matter what position report files into, the problem will not arise path for easy debugging . But only recommended in the development of end stage web designer previews.

2、 demo/reportJsp/showReport.jsp

The jsp and preview.jsp difference is that with the release of the report jsp files must be configured within raqsoftConfig.xml statements path or its subdirectories before, or file statements can not be found. Usually the formal environmental report template is placed within the application, easy to maintain. So in a formal environment (of course include designer demo from the environment to build a test environment) must use showReport.jsp.

Among them, calling preview.jsp the url without too much explanation, to view specific content in a browser point preview. If you switch showReport.jsp, here it is noted that, in principle, only reportJsp / showReport.jsp? Rpx = xxx.rpx can, if required parameters, increase & pname1 = pvalue1 & pname2 = pvalue2 ....

Note: The above two jsp, or the introduction of the core part of the label released the report, such as

1png

Method Two

Custom jsp, taglib freely distributed introduction of specific processes such as:

1. Define a jsp file

Here you can create a new, or copy another tool generates jsp file, even after build suffix to a blank jsp files can be.

The idea generated by jsp follows:

<%-- Created by IntelliJ IDEA. User: hyl Date: 2019/11/19 Time: 13:17 To change this template use File | Settings | File Templates. --%> 

<%@ **page** contentType="text/html;charset=UTF-8" language="java" %>

<html>

<head>

<title>Title</title>

</head>

<body>

</body>

</html>

2, introducing the report released tag library

Jsp the first step in the blank, add tags libraries publish Run Dry statements used (default placed in the web-inf).

<%@ taglib uri=“/WEB-INF/raqsoftReport.tld” prefix=“report” %>

2png

3, the definition tag attributes, publish reports

<report:html name=“report1” reportFileName=“xxx.rpx”/>

3png

The second tag prefix as defined in step Report, the report is released tag html, it is defined here report: html as identification, specific reference tutorial ().

As can be seen by the screenshot, only need to set the value of a name, and then set the report name (reportFileName property) will be good to publish.

4, the jsp to publish the application, view the results

In an example design built-demo applications, is placed under the reportJsp, access url result (under a corresponding report template xml path) as follows

4png

Through the above steps, you can customize jsp and publish a report, if required mass participation, generate additional printing features such as exporting, simply use the corresponding label document to increase the corresponding attributes. Either way, after the release of a report by labels, when requested, will generate real-time calculation and the results show up on the page html script.

Guess you like

Origin www.cnblogs.com/xiaohuihui-11/p/12020281.html