请教各位高手:下面是用代码写与的报表文件.frx,里面的一些属性是什么意思,请不吝指教
WAIT WINDOW NOWAIT '正在生成报表,请稍候...'IF .NOT. USED('tblClass_1')
USE IN 0 tblClass_1 ALIAS TBLCLASS_1
ENDIF
SELECT TBLCLASS_1
SET ORDER TO 班名称
LOREPORT = NEWOBJECT('SFReportFile','SFREPOBJ')
LOREPORT.CREPORTFILE = 'MyReport.frx'
LOREPORT.LSUMMARYBAND = .T.
LOREPORT.CFONTNAME = '宋体'
LOREPORT.NFONTSIZE = 11
LOREPORT.LPRIVATEDATASESSION = .F.
LOREPORT.CUNITS = 'C'
LOVARIABLE = LOREPORT.CREATEVARIABLE()
= 'nCountStudent'
LOVARIABLE.CVALUE = 0
LOVARIABLE.CINITIALVALUE = 0
LOVARIABLE.CTOTALTYPE = 'Count'
LOVARIABLE.NRESETONGROUP = 1
LOVARIABLE = LOREPORT.CREATEVARIABLE()
= 'nAveMark1'
LOVARIABLE.CVALUE = 'tblclass_1.语文成绩'
LOVARIABLE.CINITIALVALUE = 0
LOVARIABLE.CTOTALTYPE = 'Average'
LOVARIABLE.NRESETONGROUP = 1
LOVARIABLE = LOREPORT.CREATEVARIABLE()
= 'nAveMark2'
LOVARIABLE.CVALUE = 'tblclass_1.数学成绩'
LOVARIABLE.CINITIALVALUE = 0
LOVARIABLE.CTOTALTYPE = 'Average'
LOVARIABLE.NRESETONGROUP = 1
LOPAGEHEADER = LOREPORT.GETREPORTBAND('Page Header')
LOPAGEHEADER.NHEIGHT = 4
LOOBJECT = LOPAGEHEADER.ADDITEM('text')
LOOBJECT.CEXPRESSION = '学生成绩表'
LOOBJECT.CFONTNAME = '楷体_GB2312'
LOOBJECT.NFONTSIZE = 20
LOOBJECT.NWIDTH = 20
LOOBJECT.NHEIGHT = 2
LOOBJECT.NVPOSITION = 2
LOOBJECT.NHPOSITION = 20
LOOBJECT.NFORECOLOR = RGB(0,0,0)
LOREPORT.CREATEGROUPBAND()
LOGROUP = LOREPORT.GETREPORTBAND('Group Header',1)
LOGROUP.CEXPRESSION = 'tblClass_1.班名称'
LOGROUP.NHEIGHT = 2.6
LOGROUP.LPRINTONEACHPAGE = .T.
LOGROUP.LSTARTONNEWPAGE = .T.
LOOBJECT = LOGROUP.ADDITEM('field')
LOOBJECT.CEXPRESSION = "'班级名称:'+ALLTRIM(班名称)"
LOOBJECT.NWIDTH = 40
LOOBJECT.NHEIGHT = 1
LOOBJECT.NVPOSITION = 0.5
LOOBJECT.NHPOSITION = 2
LOOBJECT = LOGROUP.ADDITEM('box')
LOOBJECT.NHEIGHT = 1.5
LOOBJECT.NWIDTH = 64
LOOBJECT.NVPOSITION = 2
LOOBJECT.NHPOSITION = 2
LOOBJECT.NPENSIZE = 1
LOOBJECT = LOGROUP.ADDITEM('line')
LOOBJECT.NHEIGHT = 1.5
LOOBJECT.NVPOSITION = 2
LOOBJECT.NHPOSITION = 18
LOOBJECT.LVERTICAL = .T.
LOOBJECT.NPENSIZE = 1
LOOBJECT = LOGROUP.ADDITEM('line')
LOOBJECT.NHEIGHT = 1.5
LOOBJECT.NVPOSITION = 2
LOOBJECT.NHPOSITION = 42
LOOBJECT.LVERTICAL = .T.
LOOBJECT.NPENSIZE = 1
LOOBJECT = LOGROUP.ADDITEM('text')
LOOBJECT.CEXPRESSION = '学生姓名'
LOOBJECT.NWIDTH = 8
LOOBJECT.NVPOSITION = 2.5
LOOBJECT.NHPOSITION = 6
LOOBJECT = LOGROUP.ADDITEM('text')
LOOBJECT.CEXPRESSION = '语文成绩'
LOOBJECT.NWIDTH = 8
LOOBJECT.NVPOSITION = 2.5
LOOBJECT.NHPOSITION = 28
LOOBJECT = LOGROUP.ADDITEM('text')
LOOBJECT.CEXPRESSION = '数学成绩'
LOOBJECT.NWIDTH = 8
LOOBJECT.NVPOSITION = 2.5
LOOBJECT.NHPOSITION = 50
LODETAIL = LOREPORT.GETREPORTBAND('Detail')
LODETAIL.NHEIGHT = 1.5
LOOBJECT = LODETAIL.ADDITEM('box')
LOOBJECT.NHEIGHT = 1.5
LOOBJECT.NWIDTH = 64
LOOBJECT.NVPOSITION = 0
LOOBJECT.NHPOSITION = 2
LOOBJECT.NPENSIZE = 1
LOOBJECT = LODETAIL.ADDITEM('line')
LOOBJECT.NHEIGHT = 1.5
LOOBJECT.NVPOSITION = 0
LOOBJECT.NHPOSITION = 18
LOOBJECT.LVERTICAL = .T.
LOOBJECT.NPENSIZE = 1
LOOBJECT = LODETAIL.ADDITEM('line')
LOOBJECT.NHEIGHT = 1.5
LOOBJECT.NVPOSITION = 0
LOOBJECT.NHPOSITION = 42
LOOBJECT.LVERTICAL = .T.
LOOBJECT.NPENSIZE = 1
LOOBJECT = LODETAIL.ADDITEM('field')
LOOBJECT.CEXPRESSION = 'tblClass_1.学生姓名'
LOOBJECT.NWIDTH = 10
LOOBJECT.NVPOSITION = 0.25
LOOBJECT.NHPOSITION = 6
LOOBJECT = LODETAIL.ADDITEM('field')
LOOBJECT.CEXPRESSION = 'tblClass_1.语文成绩'
LOOBJECT.NWIDTH = 12
LOOBJECT.NVPOSITION = 0.25
LOOBJECT.NHPOSITION = 26
LOOBJECT = LODETAIL.ADDITEM('field')
LOOBJECT.CEXPRESSION = 'tblClass_1.数学成绩'
LOOBJECT.NWIDTH = 12
LOOBJECT.NVPOSITION = 0.25
LOOBJECT.NHPOSITION = 48
LOGROUP = LOREPORT.GETREPORTBAND('Group Footer',1)
LOGROUP.NHEIGHT = 2
LOGROUP.LPRINTONEACHPAGE = .T.
LOGROUP.LSTARTONNEWPAGE = .T.
LOOBJECT = LOGROUP.ADDITEM('field')
LOOBJECT.CEXPRESSION = "'班级人数:'+STR(nCountStudent)"
LOOBJECT.NWIDTH = 20
LOOBJECT.NHEIGHT = 1
LOOBJECT.NVPOSITION = 1
LOOBJECT.NHPOSITION = 2
LOOBJECT = LOGROUP.ADDITEM('field')
LOOBJECT.CEXPRESSION = "'语文平均成绩:'+STR(nAveMark1)"
LOOBJECT.NWIDTH = 25
LOOBJECT.NHEIGHT = 1
LOOBJECT.NVPOSITION = 1
LOOBJECT.NHPOSITION = 22
LOOBJECT = LOGROUP.ADDITEM('field')
LOOBJECT.CEXPRESSION = "'数学平均成绩:'+STR(nAveMark2)"
LOOBJECT.NWIDTH = 25
LOOBJECT.NHEIGHT = 1
LOOBJECT.NVPOSITION = 1
LOOBJECT.NHPOSITION = 44
LOPAGEFOOTER = LOREPORT.GETREPORTBAND('Page Footer')
LOPAGEFOOTER.NHEIGHT = 4
LOOBJECT = LOPAGEFOOTER.ADDITEM('field')
LOOBJECT.CEXPRESSION = "'共'+STR(_PAGETOTAL)+'页 第'+STR(_PAGENO)+'页'"
LOOBJECT.NWIDTH = 30
LOOBJECT.NHEIGHT = 1
LOOBJECT.NVPOSITION = 1
LOOBJECT.NHPOSITION = 40
LOREPORT.SAVE()
REPORT FORM MyReport.frx PREVIEW
*
[ 本帖最后由 sylknb 于 2012-12-29 17:31 编辑 ]