ActiveReports Report Application Tutorial (2)---Inventory Class report

Source: Internet
Author: User
Tags ole

Original: ActiveReports Report application Tutorial (2)---Inventory Class report

In most of the report system has a list of the form of reports, such as: Customer list, commodity information list, equipment list, item purchase list, accounting vouchers, goods delivery list, employee list and so on. The list-class report is easy to see, but the type of report evolved from the inventory-class report is rich, and you can include data statistics, data columns, data grouping, and interactive reports and data visualization functions in the Inventory Class report.

This article will show you two layouts of inventory class reports, tabular inventory reports, and free layout inventory reports.

1, tabular inventory report--Customer Information list

Displays all customer information in tabular form in the Customer Information list report, including customer number, company name, contact, contact title, phone, and address information, and the report displays the total number of customers and page number information.

1.1 . Create a report in the application named RptCustomerList.cs, using the report template for the ActiveReports Area report (code-based).

Open the Rptcustomerlist report design interface with a data source chart in the upper-left corner of the detail area. Click the icon to create a report data source, the data source that we use is nwind_chs.mdb in the source code project data directory, in the Open Report DataSource dialog box, select the Provider tab, click the Make Connection button to open the Data Link Properties dialog box, and select Microsoft Jet 4.0 OLE DB Provider "Data provider, click on the" Next "button to switch to the" Connections "tab, click on the" ... "button to navigate to the Nwind_chs.mdb file and then click the" OK "button to finish creating the source action.

After returning to the OLE DB tab, enter the SQL statement in the query area: Select * from customer; The end result is as follows:

Return to the report design interface after you create the data source, and then open ActiveReports Report Explorer by VS2010 menu –> Other Windows –> Report Explorer V7

All fields in the Customer data table are listed under the fields –> bindings node in Report Explorer

1.2 . Drag the database field to the detail area of the report design interface and add the Label to the PageHeader area from the ActiveReports 7 Zone Layout report category in the VS Toolbox, and in detail Data field one by one corresponds.

Because of the limit of the report paper size, in order to be able to more content in the limited area, we need to set the TXT company name 1 and TXT address 1 control ShrinkToFit to True, the property setting control can automatically adjust the font size according to the data content.

Add a TextBox control to PageHeader and set the following properties:

DATAFIEDL = Customer ID

Summaryfunc = Count

Summarytype = GrandTotal

To add a Reportinfo control in PageFooter, set the following properties:

FormatString = {pagenumber} page, total {PageCount} page

Finally, add the Webviewer control to the ASPX page and set the following properties:

ReportName = ControlExplorer.Reports.rptCustomerList

Viewertype = Flashviewer

1.3. The F5 key runs the program to get the following results:

2. Free Layout List Report--Product Information list

When you design the ActiveReports report interface, you can drag and drop the report control to free-layout, not limited to tabular layout. Each item in the Commodity information list is displayed in multiple rows, multiple columns, and multiple rows combined.

2.1. Create a report named RptProductList.cs in the project, using the report template for the ActiveReports Area report (code-based). After the creation is complete we represent the data source information in the settings:

2.2. Drag the required fields from the Report Explorer fields and binding nodes to the report design interface, noting that the product images are rendered using the picture control. The final design effect is as follows:

2.3, run the program through the F5 key, get the following operation result:

Source: http://www.gcpowertools.com.cn/products/activereports_demo.htm

ActiveReports Report Application Tutorial (2)---Inventory Class 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.