BIRT-MyEclipse report (report) tutorial, birt-myeclipse report

Source: Internet
Author: User

BIRT-MyEclipse report (report) tutorial, birt-myeclipse report

Directory
  • Deployment report
  • Conclusion
  • Resources
  • Information Feedback
  • 1. Introduction

    We use reports on all aspects of our personal and business life. If the data is in a well-organized and informative manner, such as with business reports, it can significantly improve our critcal decision-making process. The report development workflow and MyEclipse report tool can be used to develop various Web Report types. In this tutorial, we will create, deploy, and test the basic workflow using the MyEclipse report function, a simple network report listed by the customer.

    Figure 1-1 shows the screen for completing the customer's listing report. You can also download the VOD browser example, MyEclipse> On-Demand exampleThe customer list Report project developed in this tutorial.


    Figure 1-1. view the customer list report in a Web browser

    Recommended audience

    This tutorial assumes that you are familiar with the concepts and tools of MyEclipse web project development and deployment and the functions of MyEclipse database resource manager. If you have any questions or want to know more about the topics in this tutorial, please consult the additional resources section of the resources. For more information about the full scope of MyEclipse, see our product documentation.

    System Requirements

    This tutorial is created in MyEclipse 6.0.1 Professional Edition. If you are using the latest version of MyEclipse, most of the images and descriptions should be backward compatible.

    MyEclipse 6.0.1 or later is required for the MyEclipse report. This is a professional function and is only available to professional MyEclipse users.

    2. Report development process

    The following is a new report outline for creating a task workflow:

    Each of these tasks will discuss the order in which the outlines appear.

    <XXX discussion notes here>

    3. Create a Web project for the report

    The MyEclipse report introduces a new type of project called a report Web project. This type of project is the Java EE Web project of MyEclipse enabled with report development capabilities. There are two ways to create a report Web project. The first method is to use the report Web Project Wizard. Please consider using this wizard when you have no restrictions on traditional web projects. The second method is to add the report function to an existing MyEclipse Web project. The wizard is also used for this method, but the report function can be added to the Web project if the Web project already exists. This section describes appoaches.

    3.1 Use the report Web Project Wizard 3.2 to add a report to a Web project

    You can add the report function to use any existing MyEclipse Web project in the report Function Wizard. The wizard is the same as the Wizard Page shown in Figure 3-2.

    4. Create a report

    The new report wizard on page 3 allows you to create a sample JSP page to demonstrate how to use the new report. For example, you can configure the sample JSP page to include a report linked to you or embed itNote:If you choose not to generate a sample report access page at this time, you can generate a page sample at any time to report webpage access actions from the context menu of MyEclipse in the report.

    5. Create a JDBC data source for MyEclipse

    The local MyEclipse Derby server will obtain the data in our customer listing report. You can use any database. You can configure a JDBC driver in the database resource manager, such as Oracle, ms SQL Server and other MyEclipse Derby servers provide training convenience for 6 MyEclipse as part of the sandbox Server and include a pre-configured JDBC driver.

    The embedded Derby database will work in this tutorial. If you want to keep track of different databases, make sure it runs at this point.

    The reportdemo data source has been configured to obtain the data of the MyEclipse Derby JDBC driver used. For details about how to use the JDBC data source of MyEclipse, see the JDBC data source tutorial with MyEclipse.

    6. Create a dataset

    A Data Group is a collection of data that will be retrieved from the data source displayed in a report. In this tutorial, we will create an SQL data source.

    On the second page of the wizard, enter an SQL query to retrieve the data. When you enter the query editor of your SQL query, the mode and table name supported by content are displayed. You can also double-click to automatically insert a qualified name to query the element at the end of the tree view chart or column.

    7. layout, custom and styling reports
    7.1 layout report

    With the created data source and dataset, the next step is to add the user interface elements to the report that will display the data from the customer dataset. We will start the report by adding table elements. Then, we will combine the report table columns from the columns in the data element set. It is understood that the functions provided by the table are very important:

    • Table iteration through all data rows in a dataset
    • It allows you to easily layout data in a row and column format

    7.2 sort data

    In Figure 7-6, we can see in the report that the Preview data rows are displayed in the order returned by their customer dataset query. The sorting of data rows by default can be affected by many factors, such as the order in which data is created in the database. In most cases, you want to change the order in which data will appear in the report. This section describes how to sort report data.

    7.3 format the report

    Now, the report shows that we can focus on improving the appearance of the report in the correct sequence. In this section, we will perform the following tasks:

    • Edit a column title label
    • Format column title, separated from data rows
    • Show the last and last names of contacts on the same line
    • Increase space between rows
    7.3.1 edit the column title label 7.3.2 format.

    To format the report element and set its attributes. You can complete this task in two ways:

    • You can use the Attribute Editor to set attributes of an element.
    • Defines the elements that apply the styles and styles that contain the required features. This method is used to define the format attribute at a time and apply it to multiple elements.

    In this process, we will use the first method, Attribute Editor, to set the column title to bold. The second method is used to add the title line of the color.

  • Add the background color to the title line, and use the style: display the first name and last name in the same line 7.3.3

    When you single-cell multiple elements, the MyEclipse report designer creates block-level elements. If you are familiar with HTML, you know that each block element starts a new line. To display multiple elements in the same row, you must set them as inline elements. Alternatively, you can connect the last name and the name value to a single data element that is displayed as described in this process.

    7.3.4 increase space between rows

    By default, the minimum space between table rows is added. In general, you will adjust the spacing between rows.

    7.4 Add Report title

    We need a champion to end our report. You can use the label element, text element, or data element to display the title:

    • Label elements are suitable for short-term, static text, such as Column Titles.
    • The data element is suitable for displaying dynamic values from a dataset field or calculated Field
    • The text element is suitable for multi-line text that contains different formats or dynamic values.

    In this process, you use text elements and HTML tags to format the text. Please note that you are not required to create text in HTML format. However, if you are proficient in HTML or webpage design, you may prefer to use HTML to create and format text blocks.

    1. In the report designer, select the layout tab to access the layout editor.
    2. Drag the text element from the Palette view and drag it to the top of the table. This will open the text editor Project


      Figure 7-20: drag and delete a text element to create a report title

    3. In the edit text project, select HTML from the automatically displayed drop-down list.
      Select HTML to embed text in HTML tags or CSS attributes. You can enter tags or insert common HTML tags in the text editor.
    4. In the text area, the HTML shown in 7-21 is as follows:
      <CENTER> <SPAN style = "font size: large "> <B> customer list </B> </SPAN> <BR> <FONT size =" small "> for internal use only </FONT> <BR> generate a new Date () in the <VALUE-OF> report () </VALUE-OF> </CENTER> <BR>


      Figure 7-21 mark text with HTML

    5. Select OK and preview the report. This report should appear similar to the report shown in Figure 7-22.


      Figure 7-22. preview the report and display the formatted report title

    As you can see, using text elements to embed HTML, you can:
    • Different formats are used for each row of text blocks in multiple lines.
    • Insert a dynamic value, such as the current date.

    You can also use:
    • Two label elements to display static text, line 1 and Line 2
    • Data Element to display the third row containing dynamic values

  • 8. Deployment and test report

    The Design and style of the report. The next step is to deploy the Report to the Web server and use the Web browser for testing. In this tutorial, we will deploy the reportdemo project to the Tomcat server of embedded MyEclipse.

    Note:As we contact our report, you must ensure that MyEclipse's Derby server is running. Otherwise, the report engine will not be connected and obtain data from it. We started to create the customer's dataset on the Derby server. So if you have not manually stoppped it, it should still run.

    The report Web project is an extended Web project report function that can be deployed on any J2EE Web server. For more information about how to configure and deploy the tool to other Web servers, see the deployment tutorial of MyEclipse.
    9. Conclusion

    You just created your first report and learned about many basic tools and the report design functions of MyEclipse. There are more tasks that you can complete to create more complex reports. Some of these tasks are described in other chapters:

    • Connect to your own data source
    • Create a chart
    • Create cross-tag
    • Create report parameters for user input
    • Include sub-building report
    • Format report elements according to conditions
    • Hide reports based on conditions
    • Add a hyperlink to your report link to the webpage address or link one report part to another

    Next, we will provide you with more information about the topics covered in this tutorial. We realized that we cannot cover all the problems. You may have a tutorial, but the content of this tutorial and our more learning resources, we hope that you can develop your own custom reports in your own way.

    10. Resources
    • The example is the project reportdemo developed in this tutorial.
    • Overview of MyEclipse reports
    • The reported MyEclipse is an Eclipse BIRT user.
    • BIRT
    • MyEclipse Derby server tutorial
    • MyEclipse Tomcat server tutorial
    • Application Server deployment document of MyEclipse
    11. Feedback

    We hope to hear your voice! If you like this tutorial, there are some suggestions or even some corrections, please let us know. We track the forum on our learning materials and feedback documents from all users. Please be sure to let us know the material of MyEclipse and your comments, so we can quickly find out any problems.

    <Copyright notice on START and genuitec>

    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.