用语句动态生成的数据窗口能对某列求和吗,怎么写
用语句动态生成的数据窗口能对某列求和吗,怎么写我是想动态生成数据窗口后stringls_sql,dw_sql,errls_sql='selectcl,djfromcmgl...
用语句动态生成的数据窗口能对某列求和吗,怎么写
我是想动态生成数据窗口后
string ls_sql,dw_sql,err
ls_sql='select cl,dj from cmgl'
//dw_sql=sqlca.syntaxfromsql(ls_sql,'',err)
//dw_1.create(dw_sql,err)
生成分页小计,合计,这个ls_sql里的语句怎么写 展开
我是想动态生成数据窗口后
string ls_sql,dw_sql,err
ls_sql='select cl,dj from cmgl'
//dw_sql=sqlca.syntaxfromsql(ls_sql,'',err)
//dw_1.create(dw_sql,err)
生成分页小计,合计,这个ls_sql里的语句怎么写 展开
1个回答
展开全部
实际操作和一般的数据窗口一样,例如动态创建的DW叫dw_1
long ll_result,i
if dw_1.rowcount() > 0 then
for i = 1 to dw_1.rowcount()
ll_result = ll_result + long(dw_1.object.列名[i])
next
end if
ll_result 即是某列求和后的值
-----------------------------------
这属于动态创建计算域,语法有点长,根据不同需要来设置:
<DW Control Name>.Modify(&
"create compute(band=<Detail, Footer, Header, Header.<group #>, Summary, Trailer.<group #>, Background, Foreground>" + &
" color='<a long>' alignment='<0 - Left, 1 - Right, 2 - Center>' border='<0 - None, 1- Shadow, 2 - Box, 3 - Resize, 4 - Underline, 5 - 3D Lowered, 6 - 3D Raised>'" + &
" height.autosize=<Yes or No> pointer='<Arrow!, Cross!, HourGlass!, IBeam!, Icon!, Size!, SizeNESW!, SizeNS!, SizeNWSE!, SizeWE!, UpArrow!, or cursor filename (with path)>' moveable=<0 - False, 1 - True> resizeable=<0 - False, 1 - True> x='<an integer>' y='<an integer>' height='<an integer>' width='<an integer>' format='<constant string containing display format (i.e., [general]) for col (can also be an expression)>'" + &
" name=<string> tag='<string>' expression='<expression>' font.face='<name of type face (i.e., SYSTEM, COURIER)>' font.height='<negative number for points, positive number for PBUs (i.e., -10 = 10 points, 10 = 10 PBUs>' font.weight='<400 - Normal, 700 - Bold>' font.family='<0 - AnyFont, 1 - Roman, 2 - Swiss, 3 - Modern, 4 - Script, 5 - Decorative>' font.pitch='<0 - default, 1 - Fixed, 2 - Variable>' font.charset='<0 - Ansi, 1 - default, 2 - Symbol, 128 - Shift JIS, 255 - OEM>' font.italic='<0 - False, 1 - True>' font.strikethrough='<0 - False, 1 - True>' font.underline='<0 - False, 1 - True>' background.mode='<0 - Opaque, 1 - Transparent>' background.color='<a long>')")
long ll_result,i
if dw_1.rowcount() > 0 then
for i = 1 to dw_1.rowcount()
ll_result = ll_result + long(dw_1.object.列名[i])
next
end if
ll_result 即是某列求和后的值
-----------------------------------
这属于动态创建计算域,语法有点长,根据不同需要来设置:
<DW Control Name>.Modify(&
"create compute(band=<Detail, Footer, Header, Header.<group #>, Summary, Trailer.<group #>, Background, Foreground>" + &
" color='<a long>' alignment='<0 - Left, 1 - Right, 2 - Center>' border='<0 - None, 1- Shadow, 2 - Box, 3 - Resize, 4 - Underline, 5 - 3D Lowered, 6 - 3D Raised>'" + &
" height.autosize=<Yes or No> pointer='<Arrow!, Cross!, HourGlass!, IBeam!, Icon!, Size!, SizeNESW!, SizeNS!, SizeNWSE!, SizeWE!, UpArrow!, or cursor filename (with path)>' moveable=<0 - False, 1 - True> resizeable=<0 - False, 1 - True> x='<an integer>' y='<an integer>' height='<an integer>' width='<an integer>' format='<constant string containing display format (i.e., [general]) for col (can also be an expression)>'" + &
" name=<string> tag='<string>' expression='<expression>' font.face='<name of type face (i.e., SYSTEM, COURIER)>' font.height='<negative number for points, positive number for PBUs (i.e., -10 = 10 points, 10 = 10 PBUs>' font.weight='<400 - Normal, 700 - Bold>' font.family='<0 - AnyFont, 1 - Roman, 2 - Swiss, 3 - Modern, 4 - Script, 5 - Decorative>' font.pitch='<0 - default, 1 - Fixed, 2 - Variable>' font.charset='<0 - Ansi, 1 - default, 2 - Symbol, 128 - Shift JIS, 255 - OEM>' font.italic='<0 - False, 1 - True>' font.strikethrough='<0 - False, 1 - True>' font.underline='<0 - False, 1 - True>' background.mode='<0 - Opaque, 1 - Transparent>' background.color='<a long>')")
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询