How to put a report in a Web page (Web page and report Simple integration example)

Source: Internet
Author: User

1. Description of the problem

Now the user-developed system basically tends to the BS architecture of the browser/server mode, these systems may be developed in different languages, such as HTML, ASP, JSP, PHP, etc., so you need to make good reports embedded in these pages.

Finereport produced reports can be integrated into a Web page through a frame frame.

2. Display the report within frame frame

2.1 Integrated Method

The report, as part of the page, can be embedded in the Web page as an iframe, specifying the SRC of the IFRAME.

1. <iframe id= "Reportframe" width=" " " height= " "src="/ Webreport/reportserver?reportlet=/doc/primary/parameter/parameter.cpt "></iframe>

The user can control the location of the IFrame to control where the report is displayed on the page, the ability to get to the report through the IFRAME, to get the report content, or to invoke a ready-made method within the report, which we'll cover in a later section.

Note: The src of this method will show the full report path, especially in the case of parameters, you can use the Post method to submit the request to the IFRAME, so that there will be no specific parameters in SRC.

2 . 2 Example

Let's use HTML as an example to embed a report in an HTML page:

1. <! DOCTYPE HTML public "-//W3C//DTD HTML 4.0 transitional//en">

2.

3.

4. <title>finereport demo</title>

5. <meta http-equiv= "content-type" content="text/html; CHARSET=GBK " />

6.

7. <body>

8. <iframe id= "Reportframe" width=" " " height= " "src="/ Webreport/reportserver?reportlet=/doc/primary/parameter/parameter.cpt "></iframe>

9. </body>

Ten.

2 . 3 Effects View

Enter http://localhost:8075/WebReport/page_demo/Simple.html in the browser with the following effect:

For a completed example, refer to%fr_home%\webreport|page_demo\simple.html

3 the report is not supported for display within Div

If you want the button on your system page to invoke the Finereport internal JS method (printing method), need to load Finereport js file, Fr JS using the jquery v1.9.2 framework;

In fact, a page may be more than just the report section, the user may load other versions of jquery, in order to avoid the JS conflict, we recommend to display the report content in the IFRAME, not in the Div.

Need to call Finereport internal JS method, can be obtained through the IFRAME report recall method, specific reference to the JS usage documentation.


How to put a report in a Web page (Web page and report Simple integration example)

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.