Vs2005报表设计器XML分析总结
0--设计时默认页面设置.rdlc
初始报表设计器画板大小及一些默认值,主要是在rd:InitialDimensions中描述页面大小及默认单位,提供英吋和厘米两种单位,关系约为1Inch = 2.5厘米,注意仅仅是大约,以rd:标记开头,页面大小及左右顶底页边距见名知义。ColumnSpacing描述的是分栏间隔,默认1CM.在Report中定义的Width及Body\Height,其实就是在画板中设计的报表宽与高。
<?xml version="1.0" encoding="utf-8"?><Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Width>6.5in</Width> <Body> <Height>2in</Height> </Body> <rd:InitialLanguage>true</rd:InitialLanguage> <rd:InitialDimensions> <rd:UnitType>Inch</rd:UnitType> <rd:LeftMargin>1in</rd:LeftMargin> <rd:RightMargin>1in</rd:RightMargin> <rd:TopMargin>1in</rd:TopMargin> <rd:BottomMargin>1in</rd:BottomMargin> <rd:PageWidth>8.5in</rd:PageWidth> <rd:PageHeight>11in</rd:PageHeight> <rd:ColumnSpacing>0.5in</rd:ColumnSpacing> </rd:InitialDimensions> <rd:InitialDimensions> <rd:UnitType>Cm</rd:UnitType> <rd:Width>16cm</rd:Width> <rd:Height>5cm</rd:Height> <rd:LeftMargin>2.5cm</rd:LeftMargin> <rd:RightMargin>2.5cm</rd:RightMargin> <rd:TopMargin>2.5cm</rd:TopMargin> <rd:BottomMargin>2.5cm</rd:BottomMargin> <rd:GridSpacing>0.25cm</rd:GridSpacing> <rd:PageWidth>21cm</rd:PageWidth> <rd:PageHeight>29.7cm</rd:PageHeight> <rd:ColumnSpacing>1cm</rd:ColumnSpacing> </rd:InitialDimensions></Report>
<?xml version="1.0" encoding="utf-8"?><Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <InteractiveWidth>21cm</InteractiveWidth> <InteractiveHeight>29.7cm</InteractiveHeight> <rd:GridSpacing>0.25cm</rd:GridSpacing> <rd:SnapToGrid>true</rd:SnapToGrid> <rd:ReportID>d9dddd8a-9336-41fb-ad58-7071ffac1a5a</rd:ReportID> <rd:DrawGrid>true</rd:DrawGrid> <Language>zh-CN</Language> <LeftMargin>2.5cm</LeftMargin> <RightMargin>2.5cm</RightMargin> <TopMargin>2.5cm</TopMargin> <BottomMargin>2.5cm</BottomMargin> <PageHeight>29.7cm</PageHeight> <PageWidth>21cm</PageWidth> <Width>8cm</Width> <Body> <Columns>2</Columns> <ColumnSpacing>1cm</ColumnSpacing> <Height>6cm</Height> <Style> <BackgroundColor>Pink</BackgroundColor> <BackgroundImage> <Value>MISGoldPrinter.JPG</Value> <Source>External</Source> <BackgroundRepeat>NoRepeat</BackgroundRepeat> </BackgroundImage> <BorderColor> <Default>DarkGray</Default> <Top>Silver</Top> <Default>DarkGray</Default> <Left>Lime</Left> <Right>Red</Right> </BorderColor> <BorderStyle> <Default>Dotted</Default> </BorderStyle> <BorderWidth> <Default>2pt</Default> </BorderWidth> </Style> </Body></Report>
<?xml version="1.0" encoding="utf-8"?><Report > <PageHeader> <Height>1.25cm</Height> <PrintOnLastPage>true</PrintOnLastPage> <PrintOnFirstPage>true</PrintOnFirstPage> </PageHeader> <PageFooter> <Height>1.5cm</Height> <PrintOnLastPage>true</PrintOnLastPage> <PrintOnFirstPage>true</PrintOnFirstPage> </PageFooter></Report>
<Body> <ReportItems> <Textbox Name="textbox1"> <Value>Hello World!</Value> <Left>1cm</Left> <Top>0.75cm</Top> <Width>5.5cm</Width> <Height>0.75cm</Height> <CanShrink>true</CanShrink> <CanGrow>true</CanGrow> <Style> <Color>SpringGreen</Color> <FontFamily>宋体</FontFamily> <FontStyle>Italic</FontStyle> <FontWeight>700</FontWeight> <TextDecoration>Underline</TextDecoration> <TextAlign>Left</TextAlign> <VerticalAlign>Bottom</VerticalAlign> <Direction>RTL</Direction> <PaddingLeft>20pt</PaddingLeft> <PaddingRight>2pt</PaddingRight> <PaddingTop>10pt</PaddingTop> <PaddingBottom>2pt</PaddingBottom> <BorderColor> <Default>Red</Default> </BorderColor> <BorderStyle> <Default>Inset</Default> </BorderStyle> </Style> </Textbox> </ReportItems> </Body>
<Body> <ColumnSpacing>1cm</ColumnSpacing> <ReportItems> <Line Name="line1"> <Left>5cm</Left> <Top>1.25cm</Top> <Width>6cm</Width> <Height>0.75cm</Height> <Label>这是线</Label> <Visibility> <Hidden>true</Hidden> </Visibility> <Style> <BorderColor> <Default>Red</Default> </BorderColor> <BorderStyle> <Default>Dotted</Default> </BorderStyle> <BorderWidth> <Default>2pt</Default> </BorderWidth> <FontFamily>宋体</FontFamily> </Style> </Line> </ReportItems> <Height>5cm</Height> </Body>
<Body> <ReportItems> <Rectangle Name="rectangle1"> <Left>5.5cm</Left> <Top>0.75cm</Top> <Width>7.01058cm</Width> <Height>2.98942cm</Height> <PageBreakAtStart>true</PageBreakAtStart> <PageBreakAtEnd>false</PageBreakAtEnd> <Style> <BorderStyle> <Default>Inset</Default> </BorderStyle> <FontFamily>宋体</FontFamily> <BorderColor> <Default>DarkOrange</Default> </BorderColor> </Style> </Rectangle> </ReportItems> </Body>
<Body> <ReportItems> <Image Name="image1"> <Source>External</Source> <Value>c:\MISGoldPrinter.JPG</Value> <Sizing>AutoSize</Sizing> <Left>6cm</Left> <Top>1cm</Top> <Width>5.74074cm</Width> <Height>5cm</Height> </Image> </ReportItems> </Body>
<TableColumns> <TableColumn> <Width>3cm</Width> <FixedHeader>true</FixedHeader> </TableColumn> ... <TableColumns>
<Body> <ReportItems> <Table Name="table1"> <Left>5cm</Left> <Top>0.75cm</Top> <Width>7.75132cm</Width> <PageBreakAtStart>true</PageBreakAtStart> <PageBreakAtEnd>true</PageBreakAtEnd> <Style> <TextAlign>Left</TextAlign> <FontFamily>宋体</FontFamily> <Direction>RTL</Direction> <Color>Red</Color> <TextDecoration>Underline</TextDecoration> <FontStyle>Italic</FontStyle> </Style> <TableColumns> <TableColumn> <Width>3cm</Width> <FixedHeader>true</FixedHeader> </TableColumn> <TableColumn> <Width>2.24868cm</Width> </TableColumn> <TableColumn> <Width>2.24868cm</Width> </TableColumn> </TableColumns> <Footer> <RepeatOnNewPage>true</RepeatOnNewPage> <TableRows> <TableRow> <TableCells> <TableCell> <ReportItems> <Textbox Name="textbox7"> <rd:DefaultName>textbox7</rd:DefaultName> <ZIndex>5</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> <TableCell> <ReportItems> <Textbox Name="textbox8"> <rd:DefaultName>textbox8</rd:DefaultName> <ZIndex>4</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> <TableCell> <ReportItems> <Textbox Name="textbox9"> <rd:DefaultName>textbox9</rd:DefaultName> <ZIndex>3</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> </TableCells> <Height>1.08466cm</Height> </TableRow> </TableRows> </Footer> <Details> <TableRows> <TableRow> <TableCells> <TableCell> <ReportItems> <Textbox Name="textbox4"> <rd:DefaultName>textbox4</rd:DefaultName> <ZIndex>2</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> <TableCell> <ReportItems> <Textbox Name="textbox5"> <rd:DefaultName>textbox5</rd:DefaultName> <ZIndex>1</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> <TableCell> <ReportItems> <Textbox Name="textbox6"> <rd:DefaultName>textbox6</rd:DefaultName> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> </TableCells> <Height>1.08466cm</Height> </TableRow> </TableRows> </Details> <Header> <RepeatOnNewPage>true</RepeatOnNewPage> <TableRows> <TableRow> <TableCells> <TableCell> <ReportItems> <Textbox Name="textbox1"> <rd:DefaultName>textbox1</rd:DefaultName> <ZIndex>8</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> <TableCell> <ReportItems> <Textbox Name="textbox2"> <rd:DefaultName>textbox2</rd:DefaultName> <ZIndex>7</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> <TableCell> <ReportItems> <Textbox Name="textbox3"> <rd:DefaultName>textbox3</rd:DefaultName> <ZIndex>6</ZIndex> <Style> <PaddingLeft>2pt</PaddingLeft> <PaddingBottom>2pt</PaddingBottom> <FontFamily>宋体</FontFamily> <PaddingRight>2pt</PaddingRight> <PaddingTop>2pt</PaddingTop> </Style> <CanGrow>true</CanGrow> <Value /> </Textbox> </ReportItems> </TableCell> </TableCells> </TableRow> </TableRows> </Header> </Table> </ReportItems> </Body>