首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 編程語言 >  >> C語言 >> 關於C語言

個人開發框架總結(五):報表配置檔 XML 結構完整範例與 Header/Footer 設定

     編輯:關於C語言

ReportConfig 完整 XML 範例

<?XML version="1.0"?>
<ReportConfig xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema">
  <Title>消費明細報表</Title>
  <ColumnConfigFile>frmConsumeDetailReport</ColumnConfigFile>
  <PaperSize>
    <Height>21</Height>
    <Width>29.7</Width>
  </PaperSize>
  <Margins>
    <Left>0.5</Left><Top>0.5</Top><Right>0.5</Right><Bottom>0.5</Bottom>
  </Margins>
  <Landscape>false</Landscape>
  <DataColumns />
  <Header>
    <Objects>
      <Label>
        <Text></Text><HAlign>Center</HAlign><AutoCenter>True</AutoCenter>
        <VAlign>Middle</VAlign><Font><Name>黑體</Name><Size>15</Size></Font>
        <Key>Company</Key><Location><X>0</X><Y>0.2</Y></Location>
        <Size><Width>0</Width><Height>0.6</Height></Size>
      </Label>
      <Label>
        <Text></Text><HAlign>Center</HAlign><AutoCenter>True</AutoCenter>
        <Key>Title</Key><Location><X>0</X><Y>0.8</Y></Location>
        <Size><Width>0</Width><Height>0.6</Height></Size>
      </Label>
      <Label>
        <Text>操作員:{0}</Text><HAlign>Left</HAlign><Key>Employee</Key>
        <Location><X>0</X><Y>1.4</Y></Location>
        <Size><Width>5</Width><Height>0.6</Height></Size>
      </Label>
      <Label>
        <Text>="打印日期:" + Today.ToString("D")</Text><HAlign>Right</HAlign><AutoRight>True</AutoRight>
        <Key>PrintDate</Key><Location><X>0</X><Y>1.4</Y></Location>
        <Size><Width>5</Width><Height>0.6</Height></Size>
      </Label>
    </Objects>
    <Height>2</Height>
  </Header>
  <Footer>
    <Height>0.7</Height>
    <Objects>
      <Label>
        <Text>="第" &amp; Globals!PageNumber &amp; "頁 共" &amp; Globals!TotalPages &amp; "頁"</Text>
        <HAlign>Right</HAlign><AutoRight>True</AutoRight><Key>Page</Key>
        <Location><X>0</X><Y>0.1</Y></Location>
        <Size><Width>5</Width><Height>0.4</Height></Size>
      </Label>
    </Objects>
  </Footer>
</ReportConfig>

支援 Header/Footer 區塊,每區塊可含多個 Label,屬性包含字體、對齊、自動置中/靠右、座標、尺寸、動態運算式(=...)等。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved