Object Report
	Version='5.0.0.3'
	Title='Grid++Report'
	PageDivideLine=T
	Object Font
		Name='宋体'
		Size=90000,0
		Weight=400
		Charset=134
	End
	Object Printer
		TopMargin=1.5
		BottomMargin=1.5
	End
	Items Parameter
		Item
			Name='Comment'
			Value='演示子报表的使用\r\n\r\n在报表头与报表尾中插入子报表。一般需要将容纳子报表的报表节设置为可伸展，以便完整显示出子报表的内容。\r\n\r\n子报表在运行时需要关联一个报表对象，以便在子报表占据的空间将此关联报表的内容显示出来。可以通过子报表的“报表文件”属性指定报表模板文件名来关联报表，这样我们可以在设计报表时就预览子报表的显示效果。也可以通过运行时属性“Report”在程序中指定关联的报表对象，请参考例子程序“SubReport”。'
		End
	End
	Items Section
		Item
			Type=PageHeader
			Height=1.32292
			Items Control
				Item
					Type=MemoBox
					Name='MemoBox1'
					Object Font
						Name='楷体_GB2312'
						Size=120000,0
						Bold=T
						Charset=134
					End
					Anchor=[Top|Right]
					Left=2.19604
					Top=0.396875
					Width=13.7054
					Height=0.47625
					Text='欢迎访问Grid++Report网站www.rubylong.cn，了解最新产品信息。'
				End
				Item
					Type=Line
					Name='Line1'
					Anchor=[Left|Top|Right]
					Top=1.00542
					Width=16.0073
					PenWidth=2
				End
			End
		End
		Item
			Type=PageFooter
			Height=1.32292
			Items Control
				Item
					Type=MemoBox
					Name='MemoBox2'
					Anchor=[Top|Right]
					Left=13.2027
					Top=0.396875
					Width=2.59292
					Height=0.608542
					Text='第[#SystemVar(PageNumber)#]页 共[#SystemVar(PageCount)#]页'
				End
				Item
					Type=MemoBox
					Name='MemoBox3'
					Left=0.211667
					Top=0.396875
					Width=6.19125
					Height=0.608542
					Text='打印时间：[#SystemVar(CurrentDateTime):yyyy年MM月dd日 HH:mm:ss#]'
				End
			End
		End
		Item
			Type=ReportHeader
			Name='ReportHeader1'
			CanGrow=T
			Height=5
			Items Control
				Item
					Type=SubReport
					Name='srCustomerList'
					Dock=Fill
					ReportFile='1a.简单列表.grf'
Object Report
	Version='5.0.0.3'
	Title='Grid++Report'
	PageDivideLine=T
	Object Font
		Name='宋体'
		Size=90000,0
		Weight=400
		Charset=134
	End
	Object Printer
		TopMargin=1.5
		BottomMargin=1.5
	End
	Object DetailGrid
		PrintAdaptMethod=ResizeToFit
		Object Recordset
			ConnectionString='Provider=SQLOLEDB.1;\r\nPersist Security Info=True;\r\nData Source=;\r\nInitial Catalog=gridreport;\r\nUser ID=sa;\r\nPassword=;'
			QuerySQL='select * from Customers\r\norder by Region,City'
			Items Field
				Item
					Name='客户编号'
					DBFieldName='CustomerID'
				End
				Item
					Name='公司名称'
					DBFieldName='CompanyName'
				End
				Item
					Name='联系人'
					DBFieldName='ContactName'
				End
				Item
					Name='联系人称谓'
					DBFieldName='ContactTitle'
				End
				Item
					Name='地址'
					DBFieldName='Address'
				End
				Item
					Name='城市'
					DBFieldName='City'
				End
				Item
					Name='地区'
					DBFieldName='Region'
				End
				Item
					Name='邮编'
					DBFieldName='PostalCode'
				End
				Item
					Name='国家'
					DBFieldName='Country'
				End
				Item
					Name='电话'
					DBFieldName='Phone'
				End
				Item
					Name='传真'
					DBFieldName='Fax'
				End
			End
		End
		Items Column
			Item
				Name='CustomerID'
				Width=2.38125
			End
			Item
				Name='CompanyName'
				Width=3.175
			End
			Item
				Name='Address'
				Width=3.41313
			End
			Item
				Name='City'
				Width=1.5875
			End
			Item
				Name='Region'
				Width=1.98438
			End
			Item
				Name='Phone'
				Width=3.46604
			End
		End
		Object ColumnContent
			Height=0.79375
			Items ColumnContentCell
				Item
					Column='CustomerID'
					BackColor=White
					DataField='客户编号'
				End
				Item
					Column='CompanyName'
					BackColor=White
					DataField='公司名称'
				End
				Item
					Column='Address'
					DataField='地址'
				End
				Item
					Column='City'
					DataField='城市'
				End
				Item
					Column='Region'
					DataField='地区'
				End
				Item
					Column='Phone'
					DataField='电话'
				End
			End
		End
		Object ColumnTitle
			BackColor=Silver
			Height=0.79375
			Object Font
				Name='宋体'
				Size=90000,0
				Bold=T
				Charset=134
			End
			RepeatStyle=OnPage
			Items ColumnTitleCell
				Item
					GroupTitle=F
					Column='CustomerID'
					BackColor=White
					Text='客户编号'
				End
				Item
					GroupTitle=F
					Column='CompanyName'
					BackColor=White
					Text='公司名称'
				End
				Item
					GroupTitle=F
					Column='Address'
					BackColor=White
					Text='地址'
				End
				Item
					GroupTitle=F
					Column='City'
					BackColor=White
					Text='城市'
				End
				Item
					GroupTitle=F
					Column='Region'
					BackColor=White
					Text='地区'
				End
				Item
					GroupTitle=F
					Column='Phone'
					BackColor=White
					Text='电话'
				End
			End
		End
	End
	Items Parameter
		Item
			Name='Comment'
			Value='演示一个最基本的列表报表。'
		End
	End
	Items Section
		Item
			Type=ReportHeader
			Height=0.978958
			Items Control
				Item
					Type=StaticBox
					Name='StaticBox1'
					Object Font
						Name='宋体'
						Size=150000,0
						Bold=T
						Charset=134
					End
					Center=Horizontal
					Left=6.29708
					Top=0.185208
					Width=3.41313
					Height=0.582083
					Text='客户基本信息'
				End
			End
		End
	End
End
				End
			End
		End
		Item
			Type=ReportHeader
			Name='ReportHeader2'
			CanGrow=T
			Height=5
			Items Control
				Item
					Type=SubReport
					Name='srProductList'
					Dock=Fill
					ReportFile='1g.Product List.grf'
Object Report
	Version='5.0.0.3'
	Title='Grid++Report'
	Object Font
		Name='宋体'
		Size=105000,0
		Weight=400
		Charset=134
	End
	Object Printer
	End
	Object DetailGrid
		Object Recordset
			ConnectionString='Provider=SQLOLEDB.1;\r\nPersist Security Info=True;\r\nData Source=;\r\nInitial Catalog=gridreport;\r\nUser ID=sa;\r\nPassword=;'
			QuerySQL='select * from Products\r\norder by ProductName'
			Items Field
				Item
					Name='ProductID'
					Type=Integer
				End
				Item
					Name='ProductName'
				End
				Item
					Name='SupplierID'
					Type=Integer
				End
				Item
					Name='CategoryID'
					Type=Integer
				End
				Item
					Name='QuantityPerUnit'
				End
				Item
					Name='UnitPrice'
					Type=Currency
					Format='$#,##0.00'
				End
				Item
					Name='UnitsInStock'
					Type=Integer
					Format='#,##0'
				End
				Item
					Name='UnitsOnOrder'
					Type=Integer
					Format='#,##0'
				End
				Item
					Name='ReorderLevel'
					Type=Integer
				End
				Item
					Name='Discontinued'
					Type=Boolean
					Format='是:否'
				End
			End
		End
		Items Column
			Item
				Name='ProductID'
				Width=2.19604
			End
			Item
				Name='ProductName'
				Width=3.20146
			End
			Item
				Name='UnitPrice'
				Width=2.19604
			End
			Item
				Name='UnitsInStock'
				Width=2.40771
			End
			Item
				Name='UnitsOnOrder'
				Width=2
			End
			Item
				Name='ReorderLevel'
				Width=2
			End
			Item
				Name='Discontinued'
				Width=2
			End
		End
		Object ColumnContent
			Items ColumnContentCell
				Item
					Column='ProductID'
					TextAlign=MiddleRight
					DataField='ProductID'
				End
				Item
					Column='ProductName'
					DataField='ProductName'
				End
				Item
					Column='UnitPrice'
					TextAlign=MiddleRight
					DataField='UnitPrice'
				End
				Item
					Column='UnitsInStock'
					TextAlign=MiddleRight
					DataField='UnitsInStock'
				End
				Item
					Column='UnitsOnOrder'
					TextAlign=MiddleRight
					DataField='UnitsOnOrder'
				End
				Item
					Column='ReorderLevel'
					TextAlign=MiddleCenter
					DataField='ReorderLevel'
				End
				Item
					Column='Discontinued'
					TextAlign=MiddleCenter
					DataField='Discontinued'
				End
			End
		End
		Object ColumnTitle
			Object Font
				Name='宋体'
				Size=105000,0
				Bold=T
				Charset=134
			End
			Items ColumnTitleCell
				Item
					GroupTitle=F
					Column='ProductID'
					TextAlign=MiddleCenter
					Text='编号'
				End
				Item
					GroupTitle=F
					Column='ProductName'
					TextAlign=MiddleCenter
					Text='名称'
				End
				Item
					GroupTitle=F
					Column='UnitPrice'
					TextAlign=MiddleCenter
					Text='单价'
				End
				Item
					GroupTitle=F
					Column='UnitsInStock'
					TextAlign=MiddleCenter
					Text='库存数量'
				End
				Item
					GroupTitle=F
					Column='UnitsOnOrder'
					TextAlign=MiddleCenter
					Text='定购数量'
				End
				Item
					GroupTitle=F
					Column='ReorderLevel'
					TextAlign=MiddleCenter
					Text='订购级别'
				End
				Item
					GroupTitle=F
					Column='Discontinued'
					TextAlign=MiddleCenter
					Text='使用中'
				End
			End
		End
	End
	Items Section
		Item
			Type=ReportHeader
			Name='ReportHeader1'
			Height=1.40229
			Items Control
				Item
					Type=StaticBox
					Name='MainTitleBox'
					Object Font
						Name='宋体'
						Size=157500,0
						Bold=T
						Charset=134
					End
					Center=Horizontal
					Left=5.00063
					Top=0.3
					Width=6
					Height=0.9
					TextAlign=MiddleCenter
					Text='产品列表'
				End
			End
		End
	End
End
				End
			End
		End
		Item
			Type=ReportFooter
			Name='ReportFooter1'
			CanGrow=T
			Height=4.60375
			Items Control
				Item
					Type=MemoBox
					Name='MemoBox4'
					BackColor=Aqua
					BackStyle=Normal
					Object Font
						Name='宋体'
						Size=142500,0
						Bold=T
						Charset=134
					End
					BorderColor=WindowText
					Left=0.211667
					Top=0.211667
					Width=7.59354
					Height=0.582083
					Text='最畅销产品'
				End
				Item
					Type=SubReport
					Name='srTop10Product'
					Left=0.211667
					Top=0.79375
					Width=7.59354
					Height=3.59833
					ReportFile='1g.Top10Product.grf'
Object Report
	Version='5.0.0.3'
	Title='Grid++Report'
	Object Font
		Name='宋体'
		Size=105000,0
		Weight=400
		Charset=134
	End
	Object Printer
	End
	Object DetailGrid
		PrintAdaptMethod=ResizeToFit
		Object Recordset
			ConnectionString='Provider=SQLOLEDB.1;\r\nPersist Security Info=True;\r\nData Source=;\r\nInitial Catalog=gridreport;\r\nUser ID=sa;\r\nPassword=;'
			QuerySQL='select top 10 p.ProductID, p.ProductName, sum(o.Quantity*o.UnitPrice) As SumQty\r\nfrom [OrderDetails] o, Products p\r\nwhere o.ProductID=p.ProductID\r\ngroup by p.ProductID, p.ProductName\r\norder by sum(Quantity*o.UnitPrice) desc'
			Items Field
				Item
					Name='RowNo'
					Type=Integer
				End
				Item
					Name='ProductID'
					Type=Integer
					Format=',000'
				End
				Item
					Name='ProductName'
				End
				Item
					Name='SumQty'
					Type=Float
				End
			End
		End
		Items Column
			Item
				Name='RowNo'
				Width=1.19063
			End
			Item
				Name='ProductID'
				Width=1.79917
			End
			Item
				Name='ProductName'
				Width=2.40771
			End
			Item
				Name='SumQty'
				Width=2
			End
		End
		Object ColumnContent
			Items ColumnContentCell
				Item
					Column='RowNo'
					FreeCell=T
					Items Control
						Item
							Type=SystemVarBox
							Name='SystemVarBox1'
							Dock=Fill
							SystemVar=RowNo
						End
					End
				End
				Item
					Column='ProductID'
					DataField='ProductID'
				End
				Item
					Column='ProductName'
					DataField='ProductName'
				End
				Item
					Column='SumQty'
					TextAlign=MiddleRight
					DataField='SumQty'
				End
			End
		End
		Object ColumnTitle
			Object Font
				Name='宋体'
				Size=105000,0
				Bold=T
				Charset=134
			End
			Items ColumnTitleCell
				Item
					GroupTitle=F
					Column='RowNo'
					TextAlign=MiddleCenter
					Text='序号'
				End
				Item
					GroupTitle=F
					Column='ProductID'
					TextAlign=MiddleCenter
					Text='产品编号'
				End
				Item
					GroupTitle=F
					Column='ProductName'
					TextAlign=MiddleCenter
					Text='产品名称'
				End
				Item
					GroupTitle=F
					Column='SumQty'
					TextAlign=MiddleCenter
					Text='销售数量'
				End
			End
		End
	End
End
				End
				Item
					Type=MemoBox
					Name='MemoBox5'
					BackColor=Aqua
					BackStyle=Normal
					Object Font
						Name='宋体'
						Size=142500,0
						Bold=T
						Charset=134
					End
					BorderColor=WindowText
					Left=7.99042
					Top=0.211667
					Width=7.80521
					Height=0.582083
					Text='最有价值客户'
				End
				Item
					Type=SubReport
					Name='srTop10Customer'
					Left=7.99042
					Top=0.79375
					Width=7.80521
					Height=3.59833
					ReportFile='1g.Top10Customer.grf'
Object Report
	Version='5.0.0.3'
	Title='Grid++Report'
	Object Font
		Name='宋体'
		Size=105000,0
		Weight=400
		Charset=134
	End
	Object Printer
	End
	Object DetailGrid
		PrintAdaptMethod=ResizeToFit
		Object Recordset
			ConnectionString='Provider=SQLOLEDB.1;\r\nPersist Security Info=True;\r\nData Source=;\r\nInitial Catalog=gridreport;\r\nUser ID=sa;\r\nPassword=;'
			QuerySQL='select top 10 c.CustomerID, c.CompanyName, sum(o.Quantity*o.UnitPrice) As SumAmt\r\nfrom [OrderDetails] o, Orders m, customers c\r\nwhere o.OrderID=m.OrderID and m.CustomerID=c.CustomerID\r\ngroup by c.CustomerID, c.CompanyName\r\norder by sum(o.Quantity*o.UnitPrice) desc'
			Items Field
				Item
					Name='RowNo'
					Type=Integer
				End
				Item
					Name='CustomerID'
				End
				Item
					Name='CompanyName'
				End
				Item
					Name='SumAmt'
					Type=Currency
					Format='$#,##0.00'
				End
			End
		End
		Items Column
			Item
				Name='CustomerID'
				Width=1.79917
			End
			Item
				Name='CompanyName'
				Width=2.19604
			End
			Item
				Name='SumAmt'
				Width=2.40771
			End
			Item
				Name='RowNo'
				Width=1.00542
			End
		End
		Object ColumnContent
			Items ColumnContentCell
				Item
					Column='CustomerID'
					DataField='CustomerID'
				End
				Item
					Column='CompanyName'
					DataField='CompanyName'
				End
				Item
					Column='SumAmt'
					TextAlign=MiddleRight
					DataField='SumAmt'
				End
				Item
					Column='RowNo'
					FreeCell=T
					Items Control
						Item
							Type=SystemVarBox
							Name='SystemVarBox1'
							Dock=Fill
							SystemVar=RowNo
						End
					End
				End
			End
		End
		Object ColumnTitle
			Object Font
				Name='宋体'
				Size=105000,0
				Bold=T
				Charset=134
			End
			Items ColumnTitleCell
				Item
					GroupTitle=F
					Column='RowNo'
					Text='序号'
				End
				Item
					GroupTitle=F
					Column='CustomerID'
					TextAlign=MiddleCenter
					Text='客户编号'
				End
				Item
					GroupTitle=F
					Column='CompanyName'
					TextAlign=MiddleCenter
					Text='公司名称'
				End
				Item
					GroupTitle=F
					Column='SumAmt'
					TextAlign=MiddleCenter
					Text='销售总金额'
				End
			End
		End
	End
End
				End
			End
		End
	End
End
