Server on Cloud Foundry JasperReports

Label JasperReportsReport engineFoundry Cloud
1367 people read comments(0) Collection Report

Recently due to the needs of the laboratory work, some time in the cloud foundry on the famous report the jasperreports engine support.

About the official can refer to the address:Http://

Exactly speaking, Server JasperReports is running on Foundry Cloud as a app application. Since as an app, it will certainly take up memory and CPU resources, here need to say is that occupy the app jasperreports server memory to 2GB, so when do the jasperreports server deployment, please ensure the adequacy of memory capacity. In addition, jasperreports server as a reporting engine has been added to the cloud foundry, to a large extent is needs to be done in the cloud foundry itself service instance report generation, so the cloud Foundry itself instance JasperReports is the Server service data source.

About Server JasperReports this app source download, the address is:Http:// Source=dlp? 

The following is the specific use of Server JasperReports process.

1 deployment application jasperreportsserver-ce-4.7-cloudfoundry

First, push VMC commands are executed in the application directory, as shown in fig.:

So simple that the deployment of Server JasperReports, the implementation of the list VMC command, you can see:

We can see that on jasperreports server this app has been in operation, called jrs-ce-47, in addition also bind the a service, called jrs-repo-47. In fact, this service is a MySQL server instance. If you need to look at the database schema, can to cloud controller of the Postgres database to find name jrs-repo-47 service, finds the database database name (actually a series of characters ences from the service information of the credential, for example in my cloud foundry Name: d2b83816869c043f4b429a2d7ef6f78c4. Then you can know the name of the database by MySQL console in view of the database tables and table data. This experiment mainly uses the data table in the database JIAccessEvent .

2 use iReport to generate report format

If you are familiar with the ireport and jasperreports server, you will know the jasperreports server is actually a report generation tool, but the generated report has two: a report template, another is data report generation. And iReport is used to do the first premise. The following is how to use iReport to create a simple JRXML file.

The first step: open iReport, create a database connection

Then select the type of datasource, here is the JDBC connection:

Click next, enter the specific connection configuration link:

The name can be any name, jdbc driver such as selection, the URL will change your name for the database databasename. For example I is d2b83816869c043f4b429a2d7ef6f78c4, then the username and Passeord fill the database user and password. Once the information is completed later, you can click the test button to see whether the database can be accessed, also is to check whether the configuration information is available, if there is no problem, it will display:

In this case, the first step to establish a database connection process has been completed.

The second step: create a new report

Click on it, then enter the new model, such as:

Click A4 Blank, and then select the Report Wizard Launch, to enter the new specific options:

Finally, after a series of design, you can generate a report format, such as my format for the:

Finally, be sure to know file directory address last JRXML file, because the report template is needed in jasperreport server.

3 use Server JasperReport to generate the final report

Because has in the first step the jasperreport server this app deployment in cloud foundry, so we'd be the URL to access the, such as I:, such as:

Here on the username and password, you can use jasperadmin. About the user permissions and so on, to the official documents refer to the Jaspersoft. Login account, you can see in the root directory is a service instance, is jrs-repo-47, or that the instance has and jasperreport server bind is completed, or can also be interpreted as a jasperreport server requires a data source with. Now we need to do is how to the second step in the generation of JRXML file is introduced in. As graph:

Right click the CF folder, and once found the JasperReport option, and click to get the following results:

JRXML upload and select the just created the file, and the file named name and resource ID, finally click on the lower left corner of the submit button. This can be seen in the jrs-ca reposity this report format, and then right-click the jrs-ca select edit:

After entering, the third datasource selection, so, we can for the report template choose data source, as shown in Figure:

Can see the root of the data source, is bound to the service instance can finally use the, click the select button, choose, and then have to click on the lower left corner of the submit button, submit a final:

Actually, speaking the words from the principle, two premises of jasperreport server for report generation we have been doing a good job of, then just execution report is generated at the end of the, as shown in Figure:

Click Run, and then wait for a moment, one of the most simple statements can appear in front of you, as shown in fig.:

Is not before the template is similar to Kazakhstan, so far, the most basic work of JasperReport Server, has been completed.

Finally, hope that the use of these for your Foundry Cloud help.

If you need to communicate, please pay attention to Sina Weibo: lotus seed Fu Ruqing

Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • Visit82269 times
    • Integral:One thousand three hundred and thirty-three
    • Grade
    • Rank:18593rd name
    • Original47
    • Reproduced:0
    • Translation:1
    • Comments:49
    Blog column
    Contact information
    Latest comments