Web report printing using XML technology in ASP. NET

Source: Internet
Author: User
Design and implementation of the report printing solution using XML technology
In order to quickly implement simple report printing, I designed the following solution. Compile a general print page. To print the report, write the parameters to an XML document and call XMLReport. aspx? Report = report name to complete report creation
3.1 create a custom XML report file
XML is mainly used to describe the name, data source, format, paging printing, and other information of the printed report. Specific labels can be defined by myself. The following is an XML document developed by the author for printing reports of the member management system:
MemberList. xml
<? Xml version = "1.0" encoding = "UTF-8"?>
<XmlReport>
<Page>
<Title> Member Information </Title>
<ApplyXSLT> </ApplyXSLT>
</Page>
<Report>
<Title> Member List </Title>
<TableName> MemberList </TableName>
<SQLdataConnection> Data Source = localhost; User ID = sa; password =; Initial Catalog = XMLReport; </SQLdataConnection>
<OleDbConnection> </OleDbConnection>
<SQL> Select MemberID, prefix + '. '+ firstname + ''+ surname AS [Member Name], CityOrTown, State, PostCode,' $ '+ convert (varchar (12), FeesPaid) As Fees From Members; </SQL>
<PageSize> 10 </PageSize>
</Report>
<Report>
<Title> Member Summary </Title>
<TableName> MemberSummary </TableName>
<SQLdataConnection> Data Source = localhost; User ID = sa; password =; Initial Catalog = XMLReport; </SQLdataConnection>
<OleDbConnection> </OleDbConnection>
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.