ActiveReports 9 Practical Course (3): Illustrated form of the report

Source: Internet
Author: User

Based on the above 2 sections, we have built the AR9 development environment and configured the data source. In this section, we use the official 3 Chinese-illustrated report to show AR9 's function and share it through the actual combat mode one by one.

In the past, when doing report related work, the most feared is the report UI design work, when encountered a very complex layout of the report, it often takes two or three time to complete the report UI design work. The reason for this problem is that, in addition to the complexity of the report itself, one of the main reasons is that Report Designer does not provide enough functionality to assist in the UI design work of the report.
ActiveReports is a very easy to use control, but some features are often forgotten---such as the configuration menu for AR reports.

When we open the ActiveReports report Design screen (such as double-click *.rdl, *.rpx, *.RDLX), we are most concerned about the toolbox and the Properties window, without noticing the report menu options above the VS menu bar, report The menu has a total of 6 menu items, saving reports , report reports to the server , loading reports , loading reports from the server , data sources , settings , and more. Next, let's talk about setting menu items.

1. Optional ruler units


ActiveReports offers both inches (inch) and centimeters (cm) ruler units, so we can choose our own ruler units according to our needs, eliminating the tedious length conversion effort. (Note: The default unit is in inches)

2. Optional alignment


ActiveReports provides two alignments of snaplines (aligned by edges) and Snap to Grid (aligned by table). When you select Snaplines, you can determine the relative position relationship between controls based on the alignment guides, and when you select Snap To grid, the smallest unit of the control is the distance of one cell, and the correct position of the control can be judged based on the number of cells.

3. Optional grid spacing


When you select Show Grid, the grid is displayed in the Design view of the report, and the number of meshes is adjustable. Choosing the right ruler units and the number of grids can be convenient for us to determine the location of the space, such as: Ruler unit selection centimeters (cm), the number of grids is set to 10*10, the distance between adjacent meshes is exactly 1mm.

Once you understand the layout of the report, we'll drill through 3 officially available demos.

Report 1: General report--data list--customer list

In this example, we use the lable and TextBox control of AR report to implement the table to show the customer data.

Step 1: Create a new RPTCUSTOMERLIST.RPX report file

Step 2: Create a new data source

Step 3: Design PageHeader (report header)

Drag into the AR9 label control, modify the displayed text, and adjust the background color.

In the upper left corner of the PageHeader, add a TextBox and follow the modified rollup algorithm below--to summarize the user information for the current page.

Step 4 Design Detail (report data area)


To design the detail area, you can use Step 3 to drag the TextBox control from the AR9 Toolbox to modify the contents of the DataField field.

Here are some tips for using an AR report design: simply drag the field from the report Explorer into the detail area .

Step 5 Design PageFooter Area

At this point, we completed the customer inventory report through the above practical steps.

tip : With the designer, script, and preview below the Report Designer, you can easily implement report design and preview, which is very efficient.

Quickly verify the effect:

How is it different from the official website?

Oh, please add the following script in the script to modify the line color:

RowNo = ((RowNo%) = =. Detail. BackColor =.detail. BackColor =++ =

Report Combat 2: general report--Chart report--General chart

In this example, it is more intuitive to display chart data by using the report control chart.

Step 1: Create a new RPTSALESBYREGION.RDLX report

Step 2: Create a new data source

Step 3: Add a Chart Report control

Select Display as a column chart-a stacked chart, by selecting the chart and then clicking the Properties dialog box.

Step 4: Populate the chart data

You can also modify by clicking Chart Data after you select a chart: Sequence (series), category grouping, sequence grouping data fill operation.

In this example, we operate according to the following data:

    • Drag "Sales" to the series data region

    • Drag the category name to the X-axis data region

    • Drag the "Cargo area" to the sequence grouping area

Step 5: Preview Run effect

Report 3: Regular Report--barcode--Air China ticket

In this example, we use the bar code and AR9 new round corner design for a similar to Air China air Tickets report combat.

Step 1: Create a new RPTFLIGHTBARCODE.RDLX report and data source

To add a report, data source, enter the data source SQL used in the 1th example of this article:

Select flight Information. * From flight information order by ID;

Step 2: Background diagram of the design report

Add an embedded image

Add an image report control and set the background image for Air China tickets.

Step 3: Add barcodes

After adding the image control above, we'll add the barcode control.

Configure barcode Properties

    • layername: Set to Layer1. For ease of management, data controls are uniformly placed on the Layer1 layer.

    • symbology: Set to Ansi39 type barcode.

    • Value: Sets the barcode data to specify the ID number of the current ticket.

Note : The barcode control provided by ActiveReports supports 37 barcode formats, including: Code39 Code, CODE25 code, ITF25 code, Matrix25 code, upc-a code, UPC-E code, EAN-13 code, EAN-8 code, such as one-dimensional barcode and PDF417 and other two-dimensional barcode.

Step 4: Add a data region

After adding the background picture, bar code, start to drag data fields to fill the passenger, starting point and other data information.

Sometimes design reports, control between multiple layers is very inconvenient, obviously selected, but the report is unable to edit the data.

Here to share a AR9 new tip : In the AR report, multiple layers directly toggle visibility, check if selected, and select ActiveReports 9 by right-clicking in the blank of the VS toolbar:

Then activate layer Management---layer list V9:

Step 5: Run the full demo effect:

The full demo and Chinese database files are provided by the official:

For easy sharing and communication, watch is also available through [email protected] .

ActiveReports 9 Practical Course (3): Illustrated form of the report

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.