(注意:只能列合并,暂时无法行合并)
1.首先创建一个ReportDemo.mxml文件
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" styleName="Main"
creationComplete="Init()">
<mx:Style source="Default.css">
</mx:Style>
<mx:Script>
<![CDATA[
import myreport.design.MyReportEvent;
import myreport.ReportDesigner;
import mx.events.CloseEvent;
import myreport.ReportPrinter;
import myreport.core.ReportEngine;
import mx.collections.ArrayCollection;
import myreport.ReportViewer;
private function Init():void
{
//注册关闭事件
ReportViewer.Instance.addEventListener(CloseEvent.CLOSE, OnClose);
ReportDesigner.Instance.addEventListener(CloseEvent.CLOSE, OnClose);
//注册保存事件
ReportDesigner.Instance.addEventListener(MyReportEvent.SAVE, OnSave);
//最大页数设置
ReportEngine.MAX_PAGE = 100;
}
private function OnSave(event:MyReportEvent):void
{
trace("ReportDesigner save...");
//输出编辑后的样式
trace(ReportDesigner.Instance.GetSettingXml());
}
private function OnClose(event:CloseEvent):void
{
trace("ReportViewer or ReportDesigner close...");
}
private function ViewStyle1():void
{
ReportViewer.Instance.Show("ReportStyle1.xml", GetTableData(), GetPageData());
}
private function ViewStyle2():void
{
ReportViewer.Instance.Show("ReportStyle2.xml", GetTableData(), GetPageData());
}
private function PrintStyle1():void
{
myreport.ReportPrinter.LoadAndPrint("ReportStyle1.xml", GetTableData(), GetPageData());
}
private function PrintStyle2():void
{
myreport.ReportPrinter.LoadAndPrint("ReportStyle2.xml", GetTableData(), GetPageData());
}
private function PrintStyle2PageRange():void
{
myreport.ReportPrinter.LoadAndPrint("ReportStyle2.xml", GetTableData(), GetPageData(), "1-3");
}
private function EditStyle1():void
{
myreport.ReportDesigner.Instance.Show("ReportStyle1.xml", GetTableData(), GetPageData());
}
private function EditStyle2():void
{
myreport.ReportDesigner.Instance.Show("ReportStyle2.xml", GetTableData(), GetPageData());
}
private function NewStyle():void
{
myreport.ReportDesigner.Instance.Show(null, GetTableData(), GetPageData());
}
private function GetTableData():ArrayCollection
{
var list:ArrayCollection = new ArrayCollection();
for (var i:int = 0; i < 25; i++)
{
list.addItem({ID: i, 名称: "商品信息XXX 规格XXX 型号XXX", 数量: 10, 金额: 20, 日期: new Date()});
}
return list;
}
private function GetPageData():Dictionary
{
var dict:Dictionary = new Dictionary();
dict["主标题"] = "销售单";
dict["公司名称"] = "XXXX贸易公司";
dict["经手人"] = "某某某";
dict["公司地址"] = "广州市天河区天河路xx号 xx大厦 xx楼";
dict["公司电话"] = "66866888";
return dict;
}
]]>
</mx:Script>
<mx:Button x="30" y="30" label="打印预览(样式1)" click="ViewStyle1()"/>
<mx:Button x="218" y="30" label="打印预览(样式2)" click="ViewStyle2()"/>
<mx:Button x="30" y="91" label="直接打印(样式1)" click="PrintStyle1()"/>
<mx:Button x="218" y="91" label="直接打印(样式2)" click="PrintStyle2()"/>
<mx:Button x="388" y="91" label="直接打印(样式2,1-3页)" click="PrintStyle2PageRange()"/>
<mx:Button x="30" y="163" label="编辑报表(样式1)" click="EditStyle1()"/>
<mx:Button x="218" y="163" label="编辑报表(样式2)" click="EditStyle2()"/>
<mx:Button x="388" y="163" label="编辑报表(空白)" click="NewStyle()"/>
</mx:Application>
2.其次创建一个ReportStyle1.xml文件
<?xml version="1.0"?>
<ReportSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>ReportSettings</Name>
<PageWidth>18.4</PageWidth>
<PageHeight>26</PageHeight>
<LeftMargin>1</LeftMargin>
<RightMargin>1</RightMargin>
<TopMargin>1.5</TopMargin>
<BottomMargin>1.5</BottomMargin>
<ShowPageNumber>true</ShowPageNumber>
<Unit>cm</Unit>
<TableHeaderRepeat>true</TableHeaderRepeat>
<TableFooterRepeat>false</TableFooterRepeat>
<PageHeaderSettings>
<ItemSetting xsi:type="CaptionSetting">
<Name>一联标题</Name>
<Height>0.75</Height>
<Value>一联标题:</Value>
<BindingValue>主标题</BindingValue>
<Style>
<Name>样式</Name>
<TextAlign>Center</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>18pt</FontSize>
<FontBold>true</FontBold>
<Border>false</Border>
</Style>
</ItemSetting>
<ItemSetting xsi:type="LeftRightCaptionSetting">
<Name>二联标题</Name>
<Height>0.75</Height>
<LeftWidth>8.2</LeftWidth>
<LeftValue>公司名称:</LeftValue>
<LeftStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</LeftStyle>
<LeftBindingValue>公司名称</LeftBindingValue>
<RightValue>公司地址:</RightValue>
<RightStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</RightStyle>
<RightBindingValue>公司电话</RightBindingValue>
</ItemSetting>
<ItemSetting xsi:type="LeftMiddleRightCaptionSetting">
<Name>三联标题</Name>
<Height>0.75</Height>
<LeftWidth>5.466667</LeftWidth>
<MiddleWidth>5.466667</MiddleWidth>
<LeftValue>经手人:</LeftValue>
<LeftStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</LeftStyle>
<LeftBindingValue>经手人</LeftBindingValue>
<RightValue>经手人:</RightValue>
<RightStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</RightStyle>
<RightBindingValue>经手人</RightBindingValue>
<MiddleValue>经手人:</MiddleValue>
<MiddleStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</MiddleStyle>
<MiddleBindingValue>经手人</MiddleBindingValue>
</ItemSetting>
<ItemSetting xsi:type="FourCaptionSetting">
<Name>四联标题</Name>
<Height>0.75</Height>
<LeftWidth>4.1</LeftWidth>
<Middle1Width>4.1</Middle1Width>
<Middle2Width>4.1</Middle2Width>
<LeftValue>经手人:</LeftValue>
<LeftStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</LeftStyle>
<LeftBindingValue>经手人</LeftBindingValue>
<RightValue>经手人:</RightValue>
<RightStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</RightStyle>
<RightBindingValue>经手人</RightBindingValue>
<Middle1Value>经手人:</Middle1Value>
<Middle1Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</Middle1Style>
<Middle1BindingValue>经手人</Middle1BindingValue>
<Middle2Value>经手人:</Middle2Value>
<Middle2Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</Middle2Style>
<Middle2BindingValue>经手人</Middle2BindingValue>
</ItemSetting>
</PageHeaderSettings>
<PageFooterSettings>
<ItemSetting xsi:type="CaptionSetting">
<Name>一联标题</Name>
<Height>0.75</Height>
<Value>表尾:XXX公司</Value>
<BindingValue />
<Style>
<Name>样式</Name>
<TextAlign>Right</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</Style>
</ItemSetting>
</PageFooterSettings>
<TableColumnSettings>
<ItemSetting xsi:type="TableColumnSetting">
<Name>ID</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>名称</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>数量</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>金额</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>日期</Name>
<Width>3</Width>
</ItemSetting>
</TableColumnSettings>
<TableHeaderSettings>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>ID</Name>
<Value>ID</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>名称</Name>
<Value>名称</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>数量</Name>
<Value>数量</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>金额</Name>
<Value>金额</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>日期</Name>
<Value>日期</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
</TableHeaderSettings>
<TableDetailsSettings>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>ID</Name>
<Value />
<BindingValue />
<BindingColumn>ID</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>名称</Name>
<Value />
<BindingValue />
<BindingColumn>名称</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>数量</Name>
<Value />
<BindingValue />
<BindingColumn>数量</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format>0.##</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>金额</Name>
<Value />
<BindingValue />
<BindingColumn>金额</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format>C2</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>日期</Name>
<Value />
<BindingValue />
<BindingColumn>日期</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format>yyyy-MM-dd</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
</TableDetailsSettings>
<TableFooterSettings>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>合计</Name>
<Value>合计:</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>行单元格</Name>
<Value />
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>数量</Name>
<Value>=SUM(Fields!数量.Value)</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<Format>0.##</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>金额</Name>
<Value>=SUM(Fields!金额.Value)</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<Format>C2</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>行单元格</Name>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>合并1</Name>
<Value>备注:</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>5</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
</TableFooterSettings>
<TableGroupSettings />
</ReportSettings>
3.还可在创建一个ReportStyle2.xml
<?xml version="1.0"?>
<ReportSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>ReportSettings</Name>
<PageWidth>20.3</PageWidth>
<PageHeight>14</PageHeight>
<LeftMargin>1.5</LeftMargin>
<RightMargin>1</RightMargin>
<TopMargin>1</TopMargin>
<BottomMargin>0.5</BottomMargin>
<ShowPageNumber>false</ShowPageNumber>
<Unit>cm</Unit>
<TableHeaderRepeat>true</TableHeaderRepeat>
<TableFooterRepeat>true</TableFooterRepeat>
<PageHeaderSettings>
<ItemSetting xsi:type="CaptionSetting">
<Name>一联标题</Name>
<Height>1</Height>
<Value>一联标题:</Value>
<BindingValue>主标题</BindingValue>
<Style>
<Name>样式</Name>
<TextAlign>Center</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>18pt</FontSize>
<FontBold>true</FontBold>
<Border>false</Border>
</Style>
</ItemSetting>
<ItemSetting xsi:type="LeftMiddleRightCaptionSetting">
<Name>三联标题</Name>
<Height>0.75</Height>
<LeftWidth>6</LeftWidth>
<MiddleWidth>6</MiddleWidth>
<LeftValue>单据编号:</LeftValue>
<LeftStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</LeftStyle>
<LeftBindingValue>经手人</LeftBindingValue>
<RightValue>经手人:</RightValue>
<RightStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</RightStyle>
<RightBindingValue>经手人</RightBindingValue>
<MiddleValue>单据日期:</MiddleValue>
<MiddleStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</MiddleStyle>
<MiddleBindingValue>经手人</MiddleBindingValue>
</ItemSetting>
<ItemSetting xsi:type="LeftRightCaptionSetting">
<Name>二联标题</Name>
<Height>0.75</Height>
<LeftWidth>8.2</LeftWidth>
<LeftValue>公司名称:</LeftValue>
<LeftStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</LeftStyle>
<LeftBindingValue>公司名称</LeftBindingValue>
<RightValue>公司电话:</RightValue>
<RightStyle>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</RightStyle>
<RightBindingValue>公司电话</RightBindingValue>
</ItemSetting>
</PageHeaderSettings>
<PageFooterSettings />
<TableColumnSettings>
<ItemSetting xsi:type="TableColumnSetting">
<Name>ID</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>名称</Name>
<Width>3.5</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>数量</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>金额</Name>
<Width>3</Width>
</ItemSetting>
<ItemSetting xsi:type="TableColumnSetting">
<Name>日期</Name>
<Width>3.5</Width>
</ItemSetting>
</TableColumnSettings>
<TableHeaderSettings>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>ID</Name>
<Value>ID</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>名称</Name>
<Value>名称</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>数量</Name>
<Value>数量</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>金额</Name>
<Value>金额</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>日期</Name>
<Value>日期</Value>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
</TableHeaderSettings>
<TableDetailsSettings>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>ID</Name>
<Value />
<BindingValue />
<BindingColumn>ID</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>名称</Name>
<Value />
<BindingValue />
<BindingColumn>名称</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>数量</Name>
<Value />
<BindingValue />
<BindingColumn>数量</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format>0.##</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>金额</Name>
<Value />
<BindingValue />
<BindingColumn>金额</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format>C2</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>日期</Name>
<Value />
<BindingValue />
<BindingColumn>日期</BindingColumn>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format>yyyy-MM-dd</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
</TableDetailsSettings>
<TableFooterSettings />
<TableGroupSettings>
<ItemSetting xsi:type="TableGroupSetting">
<Name>分组小计</Name>
<GroupSize>5</GroupSize>
<PageBreakAtEnd>true</PageBreakAtEnd>
<TableGroupFooterSettings>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>小计:</Name>
<Value>小计:</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>行单元格</Name>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>数量</Name>
<Value>=SUM(Fields!数量.Value)</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>金额</Name>
<Value>=SUM(Fields!金额.Value)</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>true</FontBold>
<Border>true</Border>
</Style>
<Format>C2</Format>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>行单元格</Name>
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<ColSpan>1</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>行单元格</Name>
<Value>地址:</Value>
<BindingValue>公司地址</BindingValue>
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>true</Border>
</Style>
<Format />
<ColSpan>5</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
<ItemSetting xsi:type="TableRowSetting">
<Name>表格行</Name>
<Height>0.75</Height>
<TableCellSettings>
<ItemSetting xsi:type="TableCellSetting">
<Name>签收人</Name>
<Value>签收人:</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</Style>
<Format />
<ColSpan>2</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
<ItemSetting xsi:type="TableCellSetting">
<Name>送货人</Name>
<Value>送货人:</Value>
<BindingValue />
<BindingColumn />
<Style>
<Name>样式</Name>
<TextAlign>Left</TextAlign>
<VerticalAlign>Middle</VerticalAlign>
<FontSize>11pt</FontSize>
<FontBold>false</FontBold>
<Border>false</Border>
</Style>
<Format />
<ColSpan>3</ColSpan>
<CanGrow>true</CanGrow>
</ItemSetting>
</TableCellSettings>
</ItemSetting>
</TableGroupFooterSettings>
</ItemSetting>
</TableGroupSettings>
</ReportSettings>
(注意:还需下载一个MyReport.swc文件,可从下面的链接直接下载整个源码)
源码下载处:http://www.pudn.com/downloads381/sourcecode/flash/detail1641415.html