XML主要用来描述打印报表的名称,数据来源,格式,分页打印等信息,具体标签可自己定义,下面是笔者针对会员管理系统报表打印所制定的XML文档:
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, '