In the previous section, we learned that rdlc is a well-defined XML file. In this section, we will analyze the elements in rdlc in detail. Rdlc language specification, http://search.download.csdn.net/source/319026 can be downloaded from here
Most of the content here is translated in this specification.
Figure 2-1 structure of the rdlc XSD file (the basic element is the combination element with "+" next to the basic element)
Report elements: containers for data and layout, top-level elements of rdlc)
The following describes the classification of report subelements:
Description element:
Description: description. It can be empty.
Author: Report author. It can be empty.
Autorefresh: If HTML is displayed, the interval is automatically refreshed.
Lanauage: the default language is ZH-CN.
Page elements: (print control)
Width: the width of the Report. Note that the width here is not the final width. The sub-container width exceeds report. width. The final width will change.
Pagewidth: the default report width. The default value is 8.5in (8.5*2.54 = 21.59)
Pageheight: the default report length. If you print a fixed paper size, set the paper length accurately.
Interactiveheight: interactivewidth: displayed in the interactive Renderer. The default value is the rendering size. Such as browsers and monitors
Leftmargin, topmargin, rightmargin, bottommargin: margin
Pagehander: Header
Pagefooter: footer
Body: Page subject
Data Binding: (data presentation)
Datasources: data source that describes the report
Datasets: Describes the fields that the dataset presents in the report. You can bind the fields by binding the syntax. It will be discussed later.
Reportparameters: Report parameters, which can be passed in through programming. Inline object:
Code: Unknown Purpose
Embeddedimages: Embedded image of reports
Codemodules: loads an assembly in a report
Classes: class to be instantiated during report Initialization
Others:
Datatransform: refers to the conversion settings of report data presentation. You can introduce XSLT to convert and present the rdlc.
Customproperties: custom property information
Dataschema: the schema name or namespace that can be used to present a report
Dataelementname: name of the top element of the report data. The default value is report.
Dataelementstyle: Specifies whether the text box is displayed as an element or attribute attributenormal/elementnormal
The above is the report structure of rdlc. An rdlc file must have the body and width elements. The simplest rdlc file is
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <report xmlns = "http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns: rD = "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <br/> <body> </body> <br/> <width> 10 cm </width> <br/> </Report> <br />
Datasources and datasets are required for data binding. Reportparameters is required for the report parameters. However, these elements can be programmed.
This section describes the elements of the rdlc XSD combination.