MyEclipse Chart Tools Birt tips for use (i)

Source: Internet
Author: User

Birt is an open source report design tool integrated in Eclipse, which comes with a complete set of tools that can be used to quickly and easily design general reports. When I started using the second half of 2013, the official side of the latest Birt version was 4.3, You can download the Eclipse app with good Birt on the official website. The version of Birt2.6 is integrated in Myeclipse8.6. The configuration of projects in eclipse is relatively cumbersome, and it is recommended to use MyEclipse2013 Pro, This version integrates the Birt4.2 version. In the older version of the environment there will be a BUG, such as the cube count is inaccurate.

First of all, I made it clear that our project was chosen Birt to a large extent because it was open source free and has a complete set of tools, but Birt itself is lack of information, And the effect of the graph is also relative to other HTML5 or canvas chart to be old. However, it is very fast to find out the development efficiency after the mastery.

Here are some of the problems and techniques encountered and solved in the project to get a tan.

First introduce the basic use:

1. New Project

Create a new report Web project projects, under the Webroot reports directory under the new file, you can select a template, MyEclipse built-in with a number of reports format style template, we can also be created from a previously customized template, :

 

Where Shijn this option is a template file that I created earlier, it is stated here that the template will only save the type of report, the style. The data source that you used in the previous template, datasets these things cannot be brought to you in the new report. create the last step in MyEclipse, which will automatically create a JSP file with the name corresponding to the report file, which will have a URL linked to your report.

2. Create new data sources, datasets, and cubesWhen you create a new data source, you must have a data source connection connection:here can be a new driver, recommended to use Jtds-1.2.5.jar, specifically: then create a datasource, and then create a new dataset, with a single table (drug record table) as an example. Create a new dataset and select the datasource you created earlier. Click Next to write the SQL statement, which is the same as the operations database. Click Done to go to the more specific setup interface of the dataset. where Outputcolumns shows the data type of each field in the output, Computed columns is a computed column that can be represented by a JavaScript expression, Scripting code defines a column that we need. It is very useful for data processing. Parameters represents data set parameters, the most important function is to dynamically change the SQL statement also changed dynamically dataset.filters can filter the value of the data, delete the unwanted data, Change the dataset.among them computed columns and parameters function is more important, after the article detailed say.Click Ok,dataset to create it. Next, Cube cube is created. Its establishment, in Birt, must be based on a dataset: Select the previously created dataset, make the second step dimension and the selection of the metric build, here I take a table as an example, create a dimension, a cube of measure, Birt can also build a snowflake-like multi-table associated cube as an analysis. with Item_class as the dimension, the count of Item_code is measured. Simply put, the amount of each drug is expressed in the form of a chart.4. report making draw the report directly from the palette to drag out the chart: Here you can select the type of report, draw a bar chart by default, go to the next step, select the data source and bind the data item to the x-axis y-axis, respectively. Select the previously created Datacube: Drag the measure to the y-axis, the dimension to the x-axis, so that the simple histogram data binding is done, and the Third tab of the format chart is primarily to set the icon's style, display, and interaction.you can then choose to publish the project to Tomcat, access the display through the URL path, or preview it through the designer in previews (recommended). The effect is as follows: If you want to display the values for each bar chart, set the format chart as shown, tick show Series labels. 

These are the general steps to create a chart using Birt, and as long as there is a data warehouse, Birt provides a series of tools to create the chart. The use of Birt requires understanding the concepts of data cubes, including dimensions, measures, and collections of these things. The next article will be a summary of some of the techniques in Birt, Not to be continued.


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

MyEclipse Chart Tools Birt tips for use (i)

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.