动态数据窗口

zqfcsdn 2003-05-26 01:28:58
请教一个问题
怎样做grid样式带分组的动态数据窗口,语法该怎样写

pb6的dwsyntax里为什么没有group的语法?

那位高手知道,请赐教

我的QQ:54797022
...全文
53 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
EastSmart 2003-05-26
  • 打赏
  • 举报
回复
慢慢看看,所有语法
<transaction object>.SyntaxFromSQL(<SQL select string>, &
"Style(Detail_Bottom_Margin=<an integer> Detail_Top_Margin=<an integer> Header_Bottom_Margin=<an integer> Header_Top_Margin=<an integer> Horizontal_Spread=<an integer> Left_Margin=<an integer> Report=<Yes or No> Type=Group Vertical_Size=<an integer> Vertical_Spread=<an integer> )" + &
"Text(Alignment=<0 - Left, 1 - Right, 2 - Center> Background.Color=<a long> Background.Mode=<0 - Opaque, 1 - Transparent> Border=<0 - None, 1- Shadow, 2 - Box, 3 - Resize, 4 - Underline, 5 - 3D Lowered, 6 - 3D Raised> Color=<a long> Font.CharSet=<0 - Ansi, 1 - default, 2 - Symbol, 128 - Shift JIS, 255 - OEM> Font.Face='<name of type face (i.e., SYSTEM, COURIER)>' Font.Family=<0 - AnyFont, 1 - Roman, 2 - Swiss, 3 - Modern, 4 - Script, 5 - Decorative> Font.Height=<an integer> Font.Italic=<0 - False, 1 - True> Font.Pitch=<0 - default, 1 - Fixed, 2 - Variable> Font.Strikethrough=<0 - False, 1 - True> Font.Underline=<0 - False, 1 - True> Font.Weight=<400 - Normal, 700 - Bold> Font.Width=<an integer> )" + &
"Column(Background.Color=<a long> Background.Mode=<0 - Opaque, 1 - Transparent> Border=<0 - None, 1- Shadow, 2 - Box, 3 - Resize, 4 - Underline, 5 - 3D Lowered, 6 - 3D Raised> Color=<a long> Edit.AutoHScroll=<Yes or No> Edit.AutoSelect=<Yes or No> Edit.AutoVScroll=<Yes or No> Edit.FocusRectangle=<Yes or No> Font.CharSet=<0 - Ansi, 1 - default, 2 - Symbol, 128 - Shift JIS, 255 - OEM> Font.Face='<name of type face (i.e., SYSTEM, COURIER)>' Font.Family=<0 - AnyFont, 1 - Roman, 2 - Swiss, 3 - Modern, 4 - Script, 5 - Decorative> Font.Height=<an integer> Font.Italic=<0 - False, 1 - True> Font.Pitch=<0 - default, 1 - Fixed, 2 - Variable> Font.Strikethrough=<0 - False, 1 - True> Font.Underline=<0 - False, 1 - True> Font.Weight=<400 - Normal, 700 - Bold> Font.Width=<an integer> )" + &
"Datawindow(Color=<a long> Label.Columns=<number of labels across on a page>Label.Columns.Spacing=<an integer> Label.Ellipse_Height=<an integer> Label.Ellipse_Width=<an integer> Label.Height=<an integer> Label.Name='<constant string containing pre-defined label name>'Label.Rows=<number of rows of labels on a page>Label.Rows.Spacing=<an integer> Label.Shape=<roundrectangle, rectangle, or oval>Label.Sheet=<Yes or No> Label.TopDown=<Yes or No> Label.Width=<an integer> Message.Title='<text displayed in titlebar of datawindow error messagebox>' Print.Margin.Bottom=<an integer> Print.Margin.Left=<an integer> Print.Margin.Right=<an integer> Print.Margin.Top=<an integer> Rows_Per_Detail=<an integer> Timer_Interval=<# of milliseconds between refresh of time-related values (default is 0 for 1 minute)> Units=<0 - PB Units, 1 - Pixels, 2 - 1/1000 inch, 3 - 1/1000 cm> ) " + &
"Group(1 2 ) ",<string variable to hold errors>)
bomber2001 2003-05-26
  • 打赏
  • 举报
回复
做一个相对应的数据窗口,导出语法,哈哈
hnwczgw 2003-05-26
  • 打赏
  • 举报
回复
string ERRORS, sql_syntaxstring presentation_str, dwsyntax_str
sql_syntax = "SELECT ......"
presentation_str = "style(type=grid)"+&
"group(level=1 header.height=0 trailer.height=0 by=("分组列名" )color="536870912" trailer.color="536870912" )"
dwsyntax_str = SQLCA.SyntaxFromSQL(sql_syntax,presentation_str, ERRORS)
IF Len(ERRORS) > 0 THEN
MessageBox("出错","SyntaxFromSQL()存在错误: " + ERRORS)
RETURN
END IF
dw_1.Create( dwsyntax_str, ERRORS)
dw_1.SetTransObject(SQLCA)
dw_1.Retrieve()


devil_heart 2003-05-26
  • 打赏
  • 举报
回复
可以行建一个group类型的数据窗口,再导出来看一看语法嘛,再自己写一个动态的,这对你的水平提高很有帮助!
kojiang 2003-05-26
  • 打赏
  • 举报
回复
带分组的...关注!
普通的,大致如下:
string ERRORS, sql_syntaxstring presentation_str, dwsyntax_str
sql_syntax = "SELECT ......"
presentation_str = "style(type=grid)"
dwsyntax_str = SQLCA.SyntaxFromSQL(sql_syntax,presentation_str, ERRORS)
IF Len(ERRORS) > 0 THEN
MessageBox("出错","SyntaxFromSQL()存在错误: " + ERRORS)
RETURN
END IF
dw_1.Create( dwsyntax_str, ERRORS)
dw_1.SetTransObject(SQLCA)
dw_1.Retrieve()

611

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧