Enterprise-level agile software development platform based on DOTNET component technology-agileeas. NET platform development guide-processing reports

Source: Internet
Author: User
Tags dotnet
Report system Introduction

We all know that in the process of information system development, the report occupies a very important position. The response from the business operation data to the leaders is several comprehensive business data reports, how to select a suitable report system also makes a lot of developers tangle, agileeas. NET platform adopts the RDL-based open-source report system fyireporting, which was first based on its 2. in Version X, the document has been translated into Chinese and has been integrated with agileeas... NET platform is integrated with version 3.96. The following shows the report in agileeas. net:

The agileeas. NET platform only uses the rdlengine, rdlviewer, and reportdesigner open-source fyireporting projects, and makes the following changes to the report designer and engine:

1. modified the Excel export problem, because there are a lot of requirements in the application to export the report and the requirements must match the Print Style:

2. modified the problem of exporting Chinese characters to PDF files.

3. culture.

4. Paper-based Printing control: in enterprise applications, especially in Windows service applications, the printing of multiple bills is controlled by the same printer.

At the same time, I have integrated the fyireporting report and agileeas. net. The report designer has added the ability to create reports based on the ORM object. The report presentation is bound to the data of the ORM object.

Prepare a report

Agileeas. NET platform designer provides a very convenient report designer. The original version of fyireporting only provides a report designer based on database connections. I have added a method, based on agileeas. the ORM Data objects on the. NET platform are designed for reports, and the orm and report are integrated. Let's take a look at creating a database-related report:

First, set the connection:

Select a database table or a REPORT query statement:

After confirmation, use the report designer to design the report:

Preview a report:

The agileeas. NET platform also provides a method to design reports based on the ORM object on agileeas. NET platform without database connection. Let's take a look at the design process:

First, select the components of the orm object and the orm table object:

After confirmation, use the report designer to design the report:

Report Integration

Agileeas. the net platform adopts the integrated deployment idea in the report deployment, that is, the designed report definition is stored in the database, and the client reads the report definition during use and caches it on the client, the Platform adds an application plug-in for Report Management: used to manage all reports in the system.

Developers can use an independent report designer to design a report, and then create a new report in Report Management and import the report definition.

Create a report:

You can import a report definition according to the designed report definition file, or copy the report Definition source code from the report designer:

Developers can also directly use the integrated report designer to design reports:

The report designer integrated in the report management module is more concise than an independent report designer. Unlike the independent report design, the report designer saves the results to the report definition file, instead, it is saved directly to agileeas.. net.

ProgramUse reports in

The agileeas. NET platform provides a report print/preview control and a report print/preview window. developers can pop up a print form as needed or use a print control that can be embedded in the application interface.

Because the report definition is in the database, you need to assign the report printing control report definition and report data source before printing the report. We define an irportex interface in the Report Management of the platform, used to store report definitions. The following shows an example of using a pop-up form to print a report:

// Report object

Ireportex report = dalhelper. dalmanager. createreportex ();

Report. Session = contexthelper. Session;

Report. Name = "Medical Treatment Project List ";

Report. Refresh ();

// Data object bound to the report (ORM table object)

Iiteminfoprintlist PL = This. itemlist. getprintlist ();

// Print the dialog box

Rdlviewdialog printform = new rdlviewdialog ();

// Bind the report Definition

Printform. Report = This. Report;

// Bind and print data

Printform. dataobject = pl;

// Preview and print

Printform. printpreview ();

AboveCodeThe effect is as follows:

The usage of the report printing control provided by agileeas. NET is the same as that of the pop-up printing window. The Code is as follows:

// Report object

Ireportex report = dalhelper. dalmanager. createreportex ();

Report. Session = contexthelper. Session;

Report. Name = "demo Report ";

Report. Refresh ();

// Data object bound to the report (ORM table object)

Iiteminfolist datalist =

EAS. Exam. Dal. interface. dalhelper. dalmanager. createiteminfolist ();

Datalist. Session = contexthelper. Session;

Datalist. getiteminfolist (string. Empty, this. tbname. Text );

// Bind the report Definition

This. reportviewer. Report = This. Report;

// Bind and print data

This. reportviewer. dataobject = pl;

The above code execution results are as follows:

In agileeas. in the development of application projects on the net platform, it is simple and intuitive to use this mode for report development. In our development practices, we can also use this method to replace the data query module.

 

 

Link

Agileeas. NET platform development guide-series Directories

Introduction to agileeas. NET application development platform-Index

Official website of agileeas. net

Agile Software Engineering Lab

 

QQ group: 109773358, 15118502 (full)

Related Article

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.