Myeclipse8.6 -- learning Birt report development.

Source: Internet
Author: User

Good. Open myeclipse8.6. I am going to be Chinese-based. If you want to be Chinese-based, you can continue to Baidu myeclipse8.6's Chinese-based. Someone has already made a document and clearly described it from start to end.. Good. After the project is opened, click File -- New -- Report web project:

The project structure is displayed, and a new report is created in the Reports folder under the webroot directory:

If you like it, change the file name but the suffix cannot be changed. It must end with. rptdesign-next step.

There are many types for you to choose, select a blank report, and continue to the legendary "Next ".

It will create a JSP interface for you, put a tag on this page, start the Web Container, access this JSP page, click the link of tag a to jump to the report page. -- click "finish "!

After you click "complete" to create a report, you will be able to see this interface. Click the mode in the lower left corner to see it ,! When editing, We can click the <layout> tab.

I believe that all of you have configured this data source (most suitable for hibernate), and my database is Oracle10g. After you have created this data source, you 'd better copy the URL, because it will be used later.

I pasted my database with only one table, which is actually the database table in the previous article ~~~!!!

If you choose no when myeclipse asks you if you want to enter any mode, you 'd better select the "myeclipse Java Enterprise" perspective in the editing mode. It is easier to do this.

Now let's create a new data source. To be honest, I thought I was working on ASP. NET. This integration is indeed much more convenient. You only need to write SQL statements or stored procedures, but it also causes the bloated Birt. Continue.

Select New Data Source

There are many types of data sources, which you want to use, name the data source, and continue to the next step.

Select driver and paste the copied URL. Then complete.

With the data source, you can create a dataset. If the data source is a database, the dataset is a data table!

Enter the name of the Data Group (SET) and continue to the next step.

Here we will see your tablespace. I only have one table here, you can write SQL statements by yourself, you can double-click the column name, or the table name, it will automatically put your column name the English words with the table name are written to the edit text box, and there are many options, Proc, and view, which are also very good for complex data support. Click Finish to write the SQL.

After the previous step is completed, an edit box will pop up. You can click query to write the SQL statement again, or create a composite column, sum, or something. Click Preview result to see if the data is correct! After OK, click "OK "!

In the data explorer subtab, you can see that your data source and dataset are only for your current report.

After everything is ready, you usually need to write the code by hand, but the premise is that you can write the XML code if you are very good at it. If you are not familiar with it, you can use the drawing method to complete it. right-click a table on the "layout" option editing mode page and choose "insert"> "table" to create a table.

You can also select a table in the palette sub-label and drag it directly to the template.

Select the number of columns and select the dataset here. Click OK.

Drag the column you want to display in the dataset to the detailed data row and the column where my ID is to be displayed in the first column. Then drag the column to the first column of the detailed data row. Note that the detailed data row!

The other columns are the same. You can drag and drop the columns if you want to display them!

After dragging, save, and Click Preview mode ~~~ Look at data and Styles ,! The style can be customized. I am too lazy to change it. To be honest, I am too lazy to change the style!

OK. I am returning to layout mode, adding a chart, or in palette, or right-clicking to drag or select.

Select a line chart, three dimensions, and an output SVG vector image ~~~!!! Then, next ,!!!

Select data -- use the data from the following sources -- your dataset -- then use the title column as the category, that is, the X axis, or ABCDE, to represent the category !!!

Use clicks to draw (Y axis )~~~!!!

After the selection, you will find that there is a small red × in the upper right corner of the page. What is the problem? It is unclear why the Javascript expression is generated ~~~!!!

We need to manually change it back (maybe I set it wrong, but I don't know, so I changed it manually) click the "FX" button. There are two series (which we have made now), XY, and change them one by one (the last part of the Y axis group )!

After you click "FX", an editable text field ~~~ is displayed ~~~!

I don't know why. It generates another row [""] and removes the outer row !!!

This is the effect after the change !!! Click "Next" to enter the chart format.

Hey ~~~ Again, this Y-Series group is mentioned. Let's talk about it later ~~~!!!

In the icon format, there are a lot of options, you can check it online, I won't talk about it here, click the node on the left -- "series" -- "coloring basis" -- "select category (Other you can choose whatever you want) "Then modify the text displayed in series (in the value Y series text box ).

In the title change, there are also styles below, a mess of a big push ,! Change what you like!

Let's take a look at the modified big chart !!! Click OK to complete the process ~~~!!!

On my side, there are a lot of data, so I added a condition and wrote a new SQL statement ~~~!!!

How can I pop up this SQL editing window? Right-click your data source and click OK !!!

After you get all done, Preview It ~~~!!!

Start the Web Container and access the project !!!

This is basically the case. However, the waiting time is a little long, and there is a very small point. I don't know where to change the English on the page ~~~!!! Grandma's ~~~ What about the y-axis grouping series? I don't want to do this !!! However, I made a try and it looked awkward ~~~!! Use the ID field to group the Y axis series (this is a tubular chart ):

See ~~~!!!


My personal English skills are not good, and the loss is not a matter of two times. The official website clearly contains documents, but I cannot understand it. Are you standing in front of the eunuch with the girl? !!!

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.