12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213 |
- $PBExportHeader$w_rpt_sql.srw
- $PBExportComments$设置数据源--窗口
- forward
- global type w_rpt_sql from w_rpt_base
- end type
- type tab_1 from tab within w_rpt_sql
- end type
- type tp_table from userobject within tab_1
- end type
- type dw_1 from datawindow within tp_table
- end type
- type tp_table from userobject within tab_1
- dw_1 dw_1
- end type
- type tp_where from userobject within tab_1
- end type
- type dw_2 from datawindow within tp_where
- end type
- type dw_5 from datawindow within tp_where
- end type
- type tp_where from userobject within tab_1
- dw_2 dw_2
- dw_5 dw_5
- end type
- type tp_col from userobject within tab_1
- end type
- type dw_3 from datawindow within tp_col
- end type
- type cb_2 from commandbutton within tp_col
- end type
- type cb_3 from commandbutton within tp_col
- end type
- type tp_col from userobject within tab_1
- dw_3 dw_3
- cb_2 cb_2
- cb_3 cb_3
- end type
- type tp_sort from userobject within tab_1
- end type
- type dw_4 from datawindow within tp_sort
- end type
- type tp_sort from userobject within tab_1
- dw_4 dw_4
- end type
- type tp_sql from userobject within tab_1
- end type
- type mle_1 from multilineedit within tp_sql
- end type
- type dw_10 from datawindow within tp_sql
- end type
- type tp_sql from userobject within tab_1
- mle_1 mle_1
- dw_10 dw_10
- end type
- type tp_procedure from userobject within tab_1
- end type
- type dw_6 from datawindow within tp_procedure
- end type
- type sle_1 from singlelineedit within tp_procedure
- end type
- type st_1 from statictext within tp_procedure
- end type
- type st_2 from statictext within tp_procedure
- end type
- type tp_procedure from userobject within tab_1
- dw_6 dw_6
- sle_1 sle_1
- st_1 st_1
- st_2 st_2
- end type
- type tp_wbsjy from userobject within tab_1
- end type
- type dw_7 from datawindow within tp_wbsjy
- end type
- type tp_wbsjy from userobject within tab_1
- dw_7 dw_7
- end type
- type tp_bbgs from userobject within tab_1
- end type
- type gb_3 from groupbox within tp_bbgs
- end type
- type gb_2 from groupbox within tp_bbgs
- end type
- type gb_1 from groupbox within tp_bbgs
- end type
- type rb_1 from radiobutton within tp_bbgs
- end type
- type rb_2 from radiobutton within tp_bbgs
- end type
- type rb_3 from radiobutton within tp_bbgs
- end type
- type ddlb_1 from dropdownlistbox within tp_bbgs
- end type
- type dw_8 from datawindow within tp_bbgs
- end type
- type ddlb_3 from dropdownlistbox within tp_bbgs
- end type
- type dw_9 from datawindow within tp_bbgs
- end type
- type ddlb_2 from dropdownlistbox within tp_bbgs
- end type
- type ddlb_4 from dropdownlistbox within tp_bbgs
- end type
- type rb_6 from radiobutton within tp_bbgs
- end type
- type rb_5 from radiobutton within tp_bbgs
- end type
- type rb_7 from radiobutton within tp_bbgs
- end type
- type rb_9 from radiobutton within tp_bbgs
- end type
- type rb_4 from radiobutton within tp_bbgs
- end type
- type rb_8 from radiobutton within tp_bbgs
- end type
- type rb_10 from radiobutton within tp_bbgs
- end type
- type em_1 from editmask within tp_bbgs
- end type
- type st_3 from statictext within tp_bbgs
- end type
- type tp_bbgs from userobject within tab_1
- gb_3 gb_3
- gb_2 gb_2
- gb_1 gb_1
- rb_1 rb_1
- rb_2 rb_2
- rb_3 rb_3
- ddlb_1 ddlb_1
- dw_8 dw_8
- ddlb_3 ddlb_3
- dw_9 dw_9
- ddlb_2 ddlb_2
- ddlb_4 ddlb_4
- rb_6 rb_6
- rb_5 rb_5
- rb_7 rb_7
- rb_9 rb_9
- rb_4 rb_4
- rb_8 rb_8
- rb_10 rb_10
- em_1 em_1
- st_3 st_3
- end type
- type tab_1 from tab within w_rpt_sql
- tp_table tp_table
- tp_where tp_where
- tp_col tp_col
- tp_sort tp_sort
- tp_sql tp_sql
- tp_procedure tp_procedure
- tp_wbsjy tp_wbsjy
- tp_bbgs tp_bbgs
- end type
- type dw11 from datawindow within w_rpt_sql
- end type
- type rb_s1 from radiobutton within w_rpt_sql
- end type
- type rb_s2 from radiobutton within w_rpt_sql
- end type
- type rb_s3 from radiobutton within w_rpt_sql
- end type
- type rb_s4 from radiobutton within w_rpt_sql
- end type
- type cb_yes from commandbutton within w_rpt_sql
- end type
- type cb_no from commandbutton within w_rpt_sql
- end type
- end forward
- global type w_rpt_sql from w_rpt_base
- integer y = 4
- integer width = 3282
- integer height = 1816
- string title = "自动生成数据窗口向导"
- boolean minbox = false
- boolean maxbox = false
- boolean resizable = false
- windowtype windowtype = response!
- windowstate windowstate = normal!
- long backcolor = 80269524
- tab_1 tab_1
- dw11 dw11
- rb_s1 rb_s1
- rb_s2 rb_s2
- rb_s3 rb_s3
- rb_s4 rb_s4
- cb_yes cb_yes
- cb_no cb_no
- end type
- global w_rpt_sql w_rpt_sql
- type variables
- datawindow dw01,dw02,dw03,dw04,dw05,dw06,dw07,dw10
- DataWindowChild dw_child1,dw_child2,dw_child3
- string is_ctag
- int ii_bbgs=1,ii_band_size,ii_tables,ii_select_count,ii_select_row
- datastore ids,ids2
- int ii_rowc=50,ii_sqlno=1
- string is_sqlselect,is_where,is_fields,is_from,is_sort,is_group,is_from_old,is_arguments
- string is_procedure
- w_rpt_main win_parent
- end variables
- forward prototypes
- public subroutine wf_select (datawindow f_dw, integer f_row, integer f_label)
- public subroutine wf_dwclick (datawindow f_dw, integer f_row)
- public subroutine wf_button (datawindow f_dw, integer f_label)
- public subroutine wf_sql ()
- public subroutine wf_getfrom ()
- public subroutine wf_bbgs (string s_bbgs)
- public subroutine wf_arg ()
- public function integer wf_dw11 (string ssql)
- end prototypes
- public subroutine wf_select (datawindow f_dw, integer f_row, integer f_label);int li_row,li_select_row,j
- string ls_select_row
- if f_label= -1 then
- ii_select_count=ii_select_count -1
- is_ctag=f_dw.getitemstring(f_row,'ctag')
- ii_select_row=long(left(is_ctag,3))
- is_ctag=right(is_ctag,len(is_ctag) -4)
- f_dw.setitem(f_row,'ctag',is_ctag)
- for j=1 to 999
- li_row=f_dw.getSelectedRow(li_row)
- if li_row=0 then exit
- is_ctag=f_dw.getitemstring(li_row,'ctag')
- li_select_row=long(left(is_ctag,3))
- ls_select_row=string(li_select_row -1)
- ls_select_row=space(3 -len(ls_select_row))+ls_select_row
- if li_select_row>ii_select_row then
- is_ctag=ls_select_row+'.'+right(is_ctag,len(is_ctag) -4)
- f_dw.setitem(li_row,'ctag',is_ctag)
- end if
- next
- else
- ii_select_count=ii_select_count+1
- is_ctag=string(ii_select_count)
- is_ctag=space(3 -len(is_ctag))+is_ctag
- is_ctag=is_ctag+'.'+f_dw.getitemstring(f_row,'ctag')
- f_dw.setitem(f_row,'ctag',is_ctag)
- end if
- return
- end subroutine
- public subroutine wf_dwclick (datawindow f_dw, integer f_row);if f_row>0 then
- if f_dw.getSelectedrow(f_row -1)=f_row then
- f_dw.Selectrow(f_row,false)
- wf_select(f_dw,f_row,-1)
- else
- f_dw.Selectrow(f_row,true)
- wf_select(f_dw,f_row,1)
- end if
- end if
- end subroutine
- public subroutine wf_button (datawindow f_dw, integer f_label);int li,li_rows
- li_rows=f_dw.rowcount()
- for li=1 to li_rows
- if f_dw.getSelectedRow(li -1)=li then
- if f_label=-1 then
- f_dw.SelectRow(li,false)
- wf_select(f_dw,li,-1)
- end if
- else
- if f_label=1 then
- f_dw.SelectRow(li,true)
- wf_select(f_dw,li,1)
- end if
- end if
- next
- end subroutine
- public subroutine wf_sql ();string ls_fields,ls_dbname,ls_name,ls_tag,ls_type,ls_table
- int j,li_row,li_len2,li_pos
- ids.reset()
- dw11.reset()
- dw02.accepttext()
- dw04.accepttext()
- ii_rows=dw03.rowcount()
- dw03.rowscopy(1,ii_rows,Primary!,ids,1,Primary!)
- ids.setfilter("mid(ctag,4,1)='.'")
- ids.filter()//过滤选择好的字段
- ids.setsort("ctag")
- ids.sort()//按选择字段的顺序排序
- if is_datasource='dw' then//前台
- is_sqlselect=f_replace(trim(ids2.object.datawindow.table.sqlselect),'~~~"','')//SQL语句里的~"可以去掉
- else//后台
- wf_getfrom()
- end if
- ii_rows=ids.rowcount()
- for i=1 to ii_rows
- ls_dbname=ids.getitemstring(i,2)
- ls_fields=ls_fields+','+ls_dbname
- if is_datasource='dw' then//前台
- ls_tag=mid(ids.getitemstring(i,1),5)
- ls_type=ids.getitemstring(i,3)
- ls_name=ids.getitemstring(i,4)
- ls_tag=mid(ls_tag,pos(ls_tag,'.')+1)
- li_pos=pos(ls_dbname,'.')
- ls_table=left(ls_dbname,li_pos -1)
- ii_row=dw11.insertrow(0)
- dw11.setitem(ii_row,'cname',ls_name)
- dw11.setitem(ii_row,'cdbname',ls_dbname)
- dw11.setitem(ii_row,'ctag',ls_tag)
- dw11.setitem(ii_row,'ctype',ls_type)
- dw11.setitem(ii_row,'cinitial',ids.getitemstring(i,'cinitial'))
- if pos(is_from,',')=0 then
- dw11.setitem(ii_row,'cupdate','yes')
- dw11.setitem(ii_row,'ckey',ids.getitemstring(i,'ckey'))
- end if
- end if
- next
- if is_datasource<>'dw' then//后台
- is_where=''
- ii_row=dw02.rowcount()
- for i=1 to ii_row//通过关联字段生成where子句语法
- s[1]=dw02.getitemstring(i,'s_col1')
- s[2]=dw02.getitemstring(i,'s_col2')
- s[5]=dw02.getitemstring(i,'s_zkh')
- s[6]=dw02.getitemstring(i,'s_ykh')
- if s[1]>'' and s[2]>'' then
- s[3]=' '+dw02.getitemstring(i,'s_relation')+' '
- if i=1 then
- s[4]=''
- else
- s[4]=dw02.getitemstring(i -1,'s_label')
- end if
- if s[4]='' then s[4]=' and '
- if is_where>'' then
- is_where=is_where+s[4]+s[5]+s[1]+s[3]+s[2]+s[6]
- else
- is_where=s[5]+s[1]+s[3]+s[2]+s[6]
- end if
- end if
- next
- is_sort=''
- for j=1 to ii_rowc//提取排序表达式
- s[1]=trim(dw04.getitemstring(j,1))
- s[2]=dw04.getitemstring(j,2)
- if s[1]>'' then
- if s[2]='2' then
- s[1]=s[1]+' desc'
- else
- s[1]=s[1]+' asc'
- end if
- is_sort=is_sort+','+s[1]
- end if
- next
- is_sort=mid(is_sort,2)
- ls_fields=mid(ls_fields,2)
- is_sqlselect='select '+ls_fields+' from '+is_from
- if is_where>'' then is_sqlselect=is_sqlselect+' where '+is_where
- if is_group>'' then is_sqlselect=is_sqlselect+' group by '+is_group
- if is_sort>'' then is_sqlselect=is_sqlselect+' order by '+is_sort
- end if
- //messagebox('',is_sqlselect)
- return
- end subroutine
- public subroutine wf_getfrom ();int li
- ii_tables=0
- is_from=''
- ii_rows=dw01.rowcount()
- for i=1 to ii_rows
- li=dw01.getSelectedRow(li)
- if li=0 then exit
- ii_tables++
- is_from=is_from+','+dw01.getitemstring(li,'table_english')
- next
- is_from=mid(is_from,2)
- end subroutine
- public subroutine wf_bbgs (string s_bbgs);ii_bbgs=long(left(s_bbgs,2))
- if ii_bbgs=0 then
- ii_bbgs=long(win_parent.id[1].ox1)
- if ii_bbgs>0 then
- ii_bbgs=ii_bbgs+5
- else
- is_temp=win_parent.id[1].ofweight
- if long(is_temp)>1 then
- ii_bbgs=5
- tab_1.tp_bbgs.em_1.text=is_temp
- else
- ii_bbgs=1
- end if
- end if
- choose case ii_bbgs
- case 1
- tab_1.tp_bbgs.rb_1.postevent(clicked!)
- case 5
- tab_1.tp_bbgs.rb_5.postevent(clicked!)
- case 6
- tab_1.tp_bbgs.rb_6.postevent(clicked!)
- case 7
- tab_1.tp_bbgs.rb_7.postevent(clicked!)
- case 8
- tab_1.tp_bbgs.rb_8.postevent(clicked!)
- case 9
- tab_1.tp_bbgs.rb_9.postevent(clicked!)
- case 10
- tab_1.tp_bbgs.rb_10.postevent(clicked!)
- end choose
- elseif ii_bbgs=5 then
- tab_1.tp_bbgs.st_3.visible=true
- tab_1.tp_bbgs.em_1.visible=true
- else
- tab_1.tp_bbgs.st_3.visible=false
- tab_1.tp_bbgs.em_1.visible=false
- end if
- end subroutine
- public subroutine wf_arg ();is_arguments=''
- ii_rows=dw05.rowcount()
- for i=1 to ii_rows//提取参数
- s[1]=trim(dw05.getitemstring(i,1))
- s[2]=trim(dw05.getitemstring(i,2))
- if s[1]>'' then
- if is_arguments>'' then is_arguments=is_arguments+','
- is_arguments=is_arguments+'("'+s[1]+'",'+s[2]+')'
- end if
- next
- if is_arguments>'' then is_arguments='('+is_arguments+')'
- end subroutine
- public function integer wf_dw11 (string ssql);ii_rows=dw05.rowcount()
- for i=1 to ii_rows//提取参数
- s[3]=trim(dw05.getitemstring(i,1))
- if s[3]='' then continue
- s[4]=trim(dw05.getitemstring(i,2))
- choose case s[4]
- case 'date'
- s[5]=string(today())
- ssql=f_replace(ssql,':'+s[3],"'"+s[5]+"'")
- case 'datetime'
- s[5]=string(now())
- ssql=f_replace(ssql,':'+s[3],"'"+s[5]+"'")
- case 'time'
- s[5]=string(time(now()))
- case 'string','number','numberlist'
- s[5]='0'
- ssql=f_replace(ssql,':'+s[3],s[5])
- case else
- s[5]='0'
- ssql=f_replace(ssql,':'+s[3],s[5])
- end choose
- next
- dw11.reset()
- s[6]=f_rpt_gdw(ssql,dw11,it_report,'','')
- if s[6]>'' then
- messagebox('出错信息',s[6])
- return 1
- end if
- istr_rpt.rsql2=ssql//此SQL的参数已经有值,可以直接运行
- return 0
- end function
- on w_rpt_sql.create
- int iCurrent
- call super::create
- this.tab_1=create tab_1
- this.dw11=create dw11
- this.rb_s1=create rb_s1
- this.rb_s2=create rb_s2
- this.rb_s3=create rb_s3
- this.rb_s4=create rb_s4
- this.cb_yes=create cb_yes
- this.cb_no=create cb_no
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.tab_1
- this.Control[iCurrent+2]=this.dw11
- this.Control[iCurrent+3]=this.rb_s1
- this.Control[iCurrent+4]=this.rb_s2
- this.Control[iCurrent+5]=this.rb_s3
- this.Control[iCurrent+6]=this.rb_s4
- this.Control[iCurrent+7]=this.cb_yes
- this.Control[iCurrent+8]=this.cb_no
- end on
- on w_rpt_sql.destroy
- call super::destroy
- destroy(this.tab_1)
- destroy(this.dw11)
- destroy(this.rb_s1)
- destroy(this.rb_s2)
- destroy(this.rb_s3)
- destroy(this.rb_s4)
- destroy(this.cb_yes)
- destroy(this.cb_no)
- end on
- event open;call super::open;win_parent = this.parentwindow()
- f_wcenter(this)
- //定义dw01,dw02,dw03,dw04是为了之后编程书写方便
- dw01=tab_1.tp_table.dw_1
- dw02=tab_1.tp_where.dw_2
- dw03=tab_1.tp_col.dw_3
- dw04=tab_1.tp_sort.dw_4
- dw05=tab_1.tp_where.dw_5
- dw06=tab_1.tp_procedure.dw_6
- dw07=tab_1.tp_wbsjy.dw_7
- dw10=tab_1.tp_sql.dw_10
- //ctag是选择的字段前面加了编号,ctag2则是没有加编号的字段中文名
- dw03.modify("ctag.visible=1 ctag2.visible=0")
- it_report=istr_rpt.transation//接收参数
- is_datasource=istr_rpt.datasource
- ids=create datastore
- ids.dataobject=dw03.dataobject
- ids2=create datastore
- if is_datasource='dw' then
- tab_1.tp_table.visible=false
- tab_1.tp_where.visible=false
- tab_1.tp_sort.visible=false
- istr_rpt.isdw=istr_rpt.userdw.object.datawindow.syntax
- ids2.create(istr_rpt.isdw)
- ids2.settransobject(it_report)
- else
- dw01.SETTRANSOBJECT(it_report)
- dw01.retrieve()
- for i=1 to ii_rowc
- dw02.insertrow(0)
- dw04.insertrow(0)
- next
- dw02.GetChild('s_col1',dw_child1)
- dw02.GetChild('s_col2',dw_child2)
- dw04.GetChild('s_sort',dw_child3)
- dw03.sharedata(dw_child1)
- dw03.sharedata(dw_child2)
- dw03.sharedata(dw_child3)
- end if
- tab_1.tp_bbgs.dw_8.INSERTROW(0)
- tab_1.tp_bbgs.dw_9.INSERTROW(0)
- tab_1.tp_bbgs.dw_8.modify("text_1.text='标题字体示例' text_1.font.height='24'")
- tab_1.tp_bbgs.dw_9.modify("text_1.text='内容字体示例' text_1.font.height='12'")
- if istr_rpt.auto='sql' then//重新设置数据源
- tab_1.tp_bbgs.visible=false
- title='重新设置数据源'
- end if
- wf_bbgs('0')
- is_arguments=istr_rpt.rarguments
- is_sqlselect=istr_rpt.rsqlselect
- is_procedure=istr_rpt.rprocedure
- if is_sqlselect='' and is_procedure='' and win_parent.dw3.rowcount()>0 then
- ii_sqlno=3
- elseif is_sqlselect='' and is_procedure>'' then
- ii_sqlno=4
- else
- if pos(is_sqlselect,'~n')>0 then//SQL中有回车符,则认为是直接写SQL语句
- ii_sqlno=2
- else
- ii_sqlno=1
- end if
- end if
- f_rpt_cksql(is_sqlselect,is_fields,is_from,is_where,is_group,is_sort)
- /////////////修改点////////////--------is_where
- if istr_rpt.auto <> 'sql' then
- is_where = istr_rpt.wheresql
- is_from = istr_rpt.tablename
- end if
- if ii_sqlno=1 then
- is_from=is_from+','
- is_where=is_where+' and '
- is_sort=is_sort+','
- do while 1=1//重新标记已选的表
- l[1]=pos(is_from,',')
- if l[1]<2 then exit
- s[1]=trim(left(is_from,l[1] -1))
- is_from=mid(is_from,l[1]+1)
- ii_row=dw01.Find("table_english='"+s[1]+"'",1,999)
- if ii_row>0 then
- dw01.SelectRow(ii_row,TRUE)
- else
- ii_sqlno=2
- end if
- loop
- tab_1.event selectionchanged(1,3)//去取dw03的数据
- if is_where<>' and ' then
- string ls[]
- int j,k,m
- is_temp=dw02.describe('s_relation.values')
- is_temp=f_replace(is_temp,'/','~t')
- f_atab(ls[],is_temp)
- k=upperbound(ls[])
- for i=1 to ii_rowc
- l[1]=pos(is_where,' and ')
- l[2]=pos(is_where,' or ')
- if l[1]+l[2]=0 then exit
- if l[1]>0 and l[2]>0 then
- l[3]=min(l[1],l[2])
- elseif l[1]>0 then
- l[3]=l[1]
- else
- l[3]=l[2]
- end if
- s[3]=trim(left(is_where,l[3] -1))
- is_where=lefttrim(mid(is_where,l[3]+4))//lefttrim不能改为trim,因为最后是' and '
- if is_where>'' then
- if l[1]=l[3] then
- dw02.setitem(i,'s_label',' and ')
- else
- dw02.setitem(i,'s_label',' or ')
- end if
- end if
- if s[3]>'' then
- for j=k to 1 step -1
- l[1]=pos(s[3],ls[j])
- if l[1]>0 then
- if pos(ls[j],'=')+pos(ls[j],'>')+pos(ls[j],'<')=0 then
- if l[1]=1 or pos(' '+char(9),mid(s[3],l[1] -1,1))=0 or pos(' '+char(9),mid(s[3],l[1]+len(ls[j]),1))=0 then//比较符为英文单词时,前面一个字符必须为空格或Tab字符
- continue
- end if
- end if
- s[1]=trim(left(s[3],l[1] -1))
- s[2]=trim(mid(s[3],l[1]+len(ls[j])))
- s[3]=''
- s[4]=''
- for m=1 to 6
- if left(s[1],1)='(' then
- s[3]=s[3]+'('
- s[1]=trim(mid(s[1],2))
- else
- exit
- end if
- next
- for m=1 to 6
- if right(s[2],1)=')' then
- s[4]=s[4]+')'
- s[2]=trim(left(s[2],len(s[2])-1))
- else
- exit
- end if
- next
- dw02.setitem(i,'s_col1',s[1])
- dw02.setitem(i,'s_col2',s[2])
- dw02.setitem(i,'s_relation',ls[j])
- dw02.setitem(i,'s_zkh',s[3])
- dw02.setitem(i,'s_ykh',s[4])
- exit
- end if
- next
- if j=0 then
- ii_sqlno=2
- end if
- end if
- next
- end if
- l[2]=1//重新标记已选的索引
- for i=1 to ii_rowc//is_sort=表达式1 asc,表达式2 desc,索引字段也带表名
- l[1]=pos(is_sort,',',l[2])
- if l[1]=0 then exit
- s[2]='1'
- s[3]=trim(left(is_sort,l[1] -1))
- if right(lower(s[3]),5)=' desc' then
- s[1]=trim(left(s[3],l[1] -6))
- s[2]='2'
- elseif right(lower(s[3]),4)=' asc' then
- s[1]=trim(left(s[3],l[1] -5))
- elseif pos(s[3],'(',l[2])=0 then//没有函数情况
- s[1]=s[3]
- elseif pos(s[3],'(',l[2])>0 then//暂时只能处理只有一个函数有','的情况,否则此索引会变成两个
- l[2]=l[1]+1
- i --
- continue
- end if
- dw04.setitem(i,1,s[1])
- if s[2]='2' then dw04.setitem(i,2,'2')
- is_sort=trim(mid(is_sort,l[1]+1))
- l[2]=1
- next
- end if
- is_arguments=mid(is_arguments,2,len(is_arguments)-2)//把两边的括号去掉
- /////////////修改点////////////--------is_arguments
- if istr_rpt.auto <> 'sql' then
- is_arguments=istr_rpt.arguments
- end if
- do while 1=1//重新标记参数
- l[1]=pos(is_arguments,'(')
- l[2]=pos(is_arguments,',',l[1])
- l[3]=pos(is_arguments,')',l[1])
- if l[1]<1 then exit
- s[1]=trim(mid(is_arguments,l[1]+2,l[2] -l[1] -3))
- s[2]=trim(mid(is_arguments,l[2]+1,l[3] -l[2] -1))
- is_arguments=mid(is_arguments,l[3]+1)
- i=dw05.insertrow(0)
- dw05.setitem(i,1,s[1])
- dw05.setitem(i,2,s[2])
- loop
- dw05.sharedata(dw06)
- dw05.sharedata(dw10)
- if ii_bbgs=9 then//crosstab
- wf_dw11(istr_rpt.rsqlselect+istr_rpt.rprocedure)//
- else
- win_parent.dw3.sharedata(dw11)
- end if
- ii_rows=dw11.rowcount()
- for i=1 to ii_rows
- if ii_sqlno=3 then//外部数据源
- s[1]=dw11.getitemstring(i,'cname')
- s[2]=dw11.getitemstring(i,'ctype')
- dw07.insertrow(0)
- dw07.setitem(i,1,s[1])
- if pos(s[2],'decimal')=1 then
- dw07.setitem(i,2,'decimal')
- dw07.setitem(i,4,long(mid(s[2],9,len(s[2])-9)))
- elseif pos(s[2],'char')=1 then
- dw07.setitem(i,2,'string')
- dw07.setitem(i,3,long(mid(s[2],6,len(s[2])-6)))
- elseif pos(s[2],'varchar')=1 then
- dw07.setitem(i,2,'string')
- dw07.setitem(i,3,long(mid(s[2],9,len(s[2])-9)))
- else
- dw07.setitem(i,2,s[2])
- end if
- elseif ii_sqlno<3 then//存储过程跳过
- s[1]=dw11.getitemstring(i,'cdbname')
- l[2]=dw03.find("cdbname='"+s[1]+"'",1,999)
- if l[2]>0 then
- wf_dwclick(dw03,l[2])
- else
- ii_sqlno=2
- end if
- end if
- next
- if ii_bbgs<>9 then//非crosstab
- win_parent.dw3.sharedataoff()
- end if
- if is_procedure>'' then
- l[1]=pos(is_procedure,'execute ')
- l[2]=pos(is_procedure,';')
- if l[2]=0 then l[2]=pos(is_procedure,' ',l[1]+8)
- if l[1]>0 and l[2]>0 then
- s[1]=trim(mid(is_procedure,l[1]+8,l[2] -l[1] -8))
- tab_1.tp_procedure.sle_1.text=s[1]
- end if
- end if
- if is_datasource='dw' then
- choose case ii_sqlno
- case 1
- rb_s1.checked=true
- case 2
- rb_s2.checked=true
- case 3
- rb_s3.checked=true
- case 4
- rb_s4.checked=true
- end choose
- rb_s1.enabled=false
- rb_s2.enabled=false
- rb_s3.enabled=false
- rb_s4.enabled=false
- tab_1.tp_sql.visible=true
- tab_1.tp_table.visible=false
- tab_1.tp_where.visible=false
- tab_1.tp_col.visible=true
- tab_1.tp_sort.visible=false
- tab_1.tp_procedure.visible=false
- tab_1.tp_wbsjy.visible=false
- tab_1.tp_sql.mle_1.text=is_sqlselect
- l[1]=long(ids2.Object.DataWindow.Column.Count)//字段总数
- for j=1 to l[1]
- s[1]=ids2.describe("#"+string(j)+'.name')//字段英文名
- s[2]=trim(ids2.describe(s[1]+'_t.text'))//字段中文名
- if pos('?!',s[2])>0 then//取不到就取字段的tag名
- s[2]=trim(ids2.describe(s[1]+'.tag'))
- end if
- if s[2]='?' then s[2]=s[1]
- s[3]=ids2.describe(s[1]+'.coltype')//字段类型
- s[4]=ids2.describe(s[1]+'.dbname')
- s[5]=ids2.describe(s[1]+'.initial')
- ii_row=dw03.insertrow(0)
- dw03.setitem(ii_row,'cname',s[1])
- dw03.setitem(ii_row,'ctag',s[2])
- dw03.setitem(ii_row,'ctype',s[3])
- dw03.setitem(ii_row,'cdbname',s[4])
- dw03.setitem(ii_row,'cinitial',s[5])
- next
- if istr_rpt.auto<>'auto' then
- ii_rows=dw03.rowcount()
- for i=1 to ii_rows
- wf_dwclick(dw03,i)
- next
- end if
- tab_1.post selecttab(tab_1.tp_col)
-
- else
- choose case ii_sqlno
- case 1
- rb_s1.postevent(clicked!)
- case 2
- rb_s2.postevent(clicked!)
- case 3
- rb_s3.postevent(clicked!)
- case 4
- rb_s4.postevent(clicked!)
- end choose
- end if
- f_getfont(tab_1.tp_bbgs.ddlb_1)
- f_getfont(tab_1.tp_bbgs.ddlb_3)
- if istr_rpt.tt='crosstab_auto' then//此参数纯粹为了取参数如istr_rpt.rprocedur2
- cb_yes.event clicked()
- end if
- end event
- event close;destroy ids
- destroy ids2
- end event
- event resize;////根据显示分辨率调整对象位置,大小
- //if ii_sqlno=1 then
- // tab_1.x=0
- // tab_1.y=0
- // tab_1.width=newwidth
- // tab_1.height=newheight
- // dw01.x=(newwidth - dw01.width -30)/2
- // dw01.height=newheight -150
- // dw02.x=(newwidth - dw02.width -30)/2
- // dw02.height=newheight -160 -dw05.height
- // dw05.x=dw02.x
- // dw05.y=dw02.y+dw02.height+8
- // ii_temp=newheight -240
- // dw03.x=(newwidth - dw03.width -30)/2
- // dw03.height=ii_temp
- // dw04.x=(newwidth - dw04.width -30)/2
- // dw04.height=newheight -150
- // tab_1.tp_col.cb_2.x=(newwidth -30)/2 -30 -tab_1.tp_col.cb_2.width
- // tab_1.tp_col.cb_3.x=(newwidth -30)/2 +30
- // tab_1.tp_sql.mle_1.width=newwidth -2*tab_1.tp_sql.mle_1.x
- //end if
- end event
- event ue_cond;tab_1.SelectTab(3)
- end event
- type tab_1 from tab within w_rpt_sql
- integer x = 5
- integer width = 3273
- integer height = 1612
- integer taborder = 10
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 80269524
- alignment alignment = center!
- integer selectedtab = 1
- tp_table tp_table
- tp_where tp_where
- tp_col tp_col
- tp_sort tp_sort
- tp_sql tp_sql
- tp_procedure tp_procedure
- tp_wbsjy tp_wbsjy
- tp_bbgs tp_bbgs
- end type
- on tab_1.create
- this.tp_table=create tp_table
- this.tp_where=create tp_where
- this.tp_col=create tp_col
- this.tp_sort=create tp_sort
- this.tp_sql=create tp_sql
- this.tp_procedure=create tp_procedure
- this.tp_wbsjy=create tp_wbsjy
- this.tp_bbgs=create tp_bbgs
- this.Control[]={this.tp_table,&
- this.tp_where,&
- this.tp_col,&
- this.tp_sort,&
- this.tp_sql,&
- this.tp_procedure,&
- this.tp_wbsjy,&
- this.tp_bbgs}
- end on
- on tab_1.destroy
- destroy(this.tp_table)
- destroy(this.tp_where)
- destroy(this.tp_col)
- destroy(this.tp_sort)
- destroy(this.tp_sql)
- destroy(this.tp_procedure)
- destroy(this.tp_wbsjy)
- destroy(this.tp_bbgs)
- end on
- event selectionchanged;int j,li_row
- string ls_sql,ls_errors
- if ii_sqlno<>1 then return
- if oldindex=1 and newindex<>1 then
- if is_datasource='dw' then//前台
- else
- wf_getfrom()
- if is_from<>is_from_old then//如果选择的表改变
- is_from_old=is_from
- dw03.reset()
- li_row=0
- ii_select_count=0
- for i=1 to ii_tables
- li_row=dw01.getSelectedRow(li_row)
- if li_row=0 then exit
- s[5]=dw01.getitemstring(li_row,'table_chinese')//表的中文名
- s[6]=dw01.getitemstring(li_row,'table_english')//表的英文名
- ls_sql='SELECT '+s[6]+'.* from '+s[6]
- if ii_tables>1 then
- s[2]=mid('ABCDEFGHIJKLMNOPQRSTUVWXYZ',i,1)+s[5]+'.'
- else
- s[2]=''
- end if
- ls_errors=f_rpt_gdw(ls_sql,dw03,it_report,s[2],s[6])
- next
- end if
- end if
- end if
- if newindex=5 then
- wf_sql()
- tab_1.tp_sql.mle_1.text=is_sqlselect
- end if
- return
- end event
- type tp_table from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "选表或视图"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "Database!"
- long picturemaskcolor = 553648127
- dw_1 dw_1
- end type
- on tp_table.create
- this.dw_1=create dw_1
- this.Control[]={this.dw_1}
- end on
- on tp_table.destroy
- destroy(this.dw_1)
- end on
- type dw_1 from datawindow within tp_table
- integer x = 571
- integer y = 4
- integer width = 2094
- integer height = 1484
- integer taborder = 2
- boolean bringtotop = true
- string dataobject = "dw_rpt_table"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event clicked;if row>0 then
- if getSelectedRow(Row - 1)=row then
- SelectRow(Row,false)
- else
- SelectRow(Row,true)
- end if
- end if
- return 1
- end event
- type tp_where from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "关联或条件"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "Join!"
- long picturemaskcolor = 553648127
- dw_2 dw_2
- dw_5 dw_5
- end type
- on tp_where.create
- this.dw_2=create dw_2
- this.dw_5=create dw_5
- this.Control[]={this.dw_2,&
- this.dw_5}
- end on
- on tp_where.destroy
- destroy(this.dw_2)
- destroy(this.dw_5)
- end on
- type dw_2 from datawindow within tp_where
- event ue_auto ( )
- integer width = 3237
- integer height = 1136
- integer taborder = 2
- string dragicon = "one!"
- boolean bringtotop = true
- string dataobject = "dw_rpt_relation"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event ue_auto;accepttext()
- l[1]=getrow()
- l[2]=getcolumn()
- if l[1]>0 then
- choose case l[2]
- case 1
- s[1]=getitemstring(l[1],1)
- if s[1]>'' then
- s[2]=getitemstring(l[1],2)
- if s[2]='' then setitem(l[1],2,'=')
- for i=l[1] -1 to 1 step -1
- s[1]=getitemstring(i,1)
- s[2]=getitemstring(i,4)
- if s[1]>'' and s[2]='' then
- setitem(i,4,' and ')
- exit
- end if
- next
- end if
- case 3,4
- s[1]=getitemstring(l[1],1)
- s[2]=getitemstring(l[1],2)
- if s[1]>'' and s[2]='' then
- setitem(l[1],2,'=')
- end if
- end choose
- end if
- end event
- event buttonclicked;if row>0 then
- deleterow(row)
- insertrow(0)
- end if
- end event
- event clicked;event ue_auto()
- end event
- event itemchanged;event ue_auto()
- end event
- event rowfocuschanged;event ue_auto()
- end event
- type dw_5 from datawindow within tp_where
- integer y = 1144
- integer width = 3232
- integer height = 340
- integer taborder = 110
- boolean bringtotop = true
- string dataobject = "dw_rpt_argument"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type tp_col from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "选字段"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "ArrangeIcons!"
- long picturemaskcolor = 553648127
- dw_3 dw_3
- cb_2 cb_2
- cb_3 cb_3
- end type
- on tp_col.create
- this.dw_3=create dw_3
- this.cb_2=create cb_2
- this.cb_3=create cb_3
- this.Control[]={this.dw_3,&
- this.cb_2,&
- this.cb_3}
- end on
- on tp_col.destroy
- destroy(this.dw_3)
- destroy(this.cb_2)
- destroy(this.cb_3)
- end on
- type dw_3 from datawindow within tp_col
- event clicked pbm_dwnlbuttonclk
- integer x = 69
- integer y = 96
- integer width = 2752
- integer height = 1372
- integer taborder = 10
- string dataobject = "dw_rpt_field_drop"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event clicked;wf_dwclick(this,row)
- end event
- type cb_2 from commandbutton within tp_col
- integer x = 1175
- integer y = 12
- integer width = 178
- integer height = 76
- integer taborder = 10
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "全选"
- end type
- event clicked;wf_button(dw_3,1)
- end event
- type cb_3 from commandbutton within tp_col
- integer x = 1399
- integer y = 12
- integer width = 219
- integer height = 76
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "全不选"
- end type
- event clicked;wf_button(dw_3,-1)
- end event
- type tp_sort from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "选索引"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "Sort!"
- long picturemaskcolor = 553648127
- dw_4 dw_4
- end type
- on tp_sort.create
- this.dw_4=create dw_4
- this.Control[]={this.dw_4}
- end on
- on tp_sort.destroy
- destroy(this.dw_4)
- end on
- type dw_4 from datawindow within tp_sort
- integer x = 238
- integer y = 12
- integer width = 2405
- integer height = 1460
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_rpt_sort"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type tp_sql from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "语句"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "SQL!"
- long picturemaskcolor = 553648127
- mle_1 mle_1
- dw_10 dw_10
- end type
- on tp_sql.create
- this.mle_1=create mle_1
- this.dw_10=create dw_10
- this.Control[]={this.mle_1,&
- this.dw_10}
- end on
- on tp_sql.destroy
- destroy(this.mle_1)
- destroy(this.dw_10)
- end on
- type mle_1 from multilineedit within tp_sql
- integer y = 28
- integer width = 3232
- integer height = 1060
- integer taborder = 20
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 80269524
- boolean vscrollbar = true
- boolean autovscroll = true
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type dw_10 from datawindow within tp_sql
- integer y = 1100
- integer width = 3227
- integer height = 360
- integer taborder = 90
- boolean bringtotop = true
- string dataobject = "dw_rpt_argument"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type tp_procedure from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "存储过程"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "DeclareProcedure!"
- long picturemaskcolor = 553648127
- dw_6 dw_6
- sle_1 sle_1
- st_1 st_1
- st_2 st_2
- end type
- on tp_procedure.create
- this.dw_6=create dw_6
- this.sle_1=create sle_1
- this.st_1=create st_1
- this.st_2=create st_2
- this.Control[]={this.dw_6,&
- this.sle_1,&
- this.st_1,&
- this.st_2}
- end on
- on tp_procedure.destroy
- destroy(this.dw_6)
- destroy(this.sle_1)
- destroy(this.st_1)
- destroy(this.st_2)
- end on
- type dw_6 from datawindow within tp_procedure
- integer x = 78
- integer y = 780
- integer width = 2802
- integer height = 604
- integer taborder = 120
- boolean bringtotop = true
- string dataobject = "dw_rpt_argument"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type sle_1 from singlelineedit within tp_procedure
- integer x = 78
- integer y = 212
- integer width = 2802
- integer height = 92
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type st_1 from statictext within tp_procedure
- integer x = 78
- integer y = 116
- integer width = 2802
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 80269524
- boolean enabled = false
- string text = "存储过程名称(如:sp_name)"
- boolean focusrectangle = false
- end type
- type st_2 from statictext within tp_procedure
- integer x = 78
- integer y = 672
- integer width = 2802
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- boolean enabled = false
- string text = "存储过程参数"
- boolean focusrectangle = false
- end type
- type tp_wbsjy from userobject within tab_1
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "外部数据源"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "ScriptYes!"
- long picturemaskcolor = 553648127
- dw_7 dw_7
- end type
- on tp_wbsjy.create
- this.dw_7=create dw_7
- this.Control[]={this.dw_7}
- end on
- on tp_wbsjy.destroy
- destroy(this.dw_7)
- end on
- type dw_7 from datawindow within tp_wbsjy
- integer x = 197
- integer y = 24
- integer width = 2583
- integer height = 1440
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_rpt_wbsjy"
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type tp_bbgs from userobject within tab_1
- event create ( )
- event destroy ( )
- integer x = 18
- integer y = 112
- integer width = 3237
- integer height = 1484
- long backcolor = 80269524
- string text = "数据窗口格式"
- long tabtextcolor = 33554432
- long tabbackcolor = 80269524
- string picturename = "RunReport!"
- long picturemaskcolor = 553648127
- gb_3 gb_3
- gb_2 gb_2
- gb_1 gb_1
- rb_1 rb_1
- rb_2 rb_2
- rb_3 rb_3
- ddlb_1 ddlb_1
- dw_8 dw_8
- ddlb_3 ddlb_3
- dw_9 dw_9
- ddlb_2 ddlb_2
- ddlb_4 ddlb_4
- rb_6 rb_6
- rb_5 rb_5
- rb_7 rb_7
- rb_9 rb_9
- rb_4 rb_4
- rb_8 rb_8
- rb_10 rb_10
- em_1 em_1
- st_3 st_3
- end type
- on tp_bbgs.create
- this.gb_3=create gb_3
- this.gb_2=create gb_2
- this.gb_1=create gb_1
- this.rb_1=create rb_1
- this.rb_2=create rb_2
- this.rb_3=create rb_3
- this.ddlb_1=create ddlb_1
- this.dw_8=create dw_8
- this.ddlb_3=create ddlb_3
- this.dw_9=create dw_9
- this.ddlb_2=create ddlb_2
- this.ddlb_4=create ddlb_4
- this.rb_6=create rb_6
- this.rb_5=create rb_5
- this.rb_7=create rb_7
- this.rb_9=create rb_9
- this.rb_4=create rb_4
- this.rb_8=create rb_8
- this.rb_10=create rb_10
- this.em_1=create em_1
- this.st_3=create st_3
- this.Control[]={this.gb_3,&
- this.gb_2,&
- this.gb_1,&
- this.rb_1,&
- this.rb_2,&
- this.rb_3,&
- this.ddlb_1,&
- this.dw_8,&
- this.ddlb_3,&
- this.dw_9,&
- this.ddlb_2,&
- this.ddlb_4,&
- this.rb_6,&
- this.rb_5,&
- this.rb_7,&
- this.rb_9,&
- this.rb_4,&
- this.rb_8,&
- this.rb_10,&
- this.em_1,&
- this.st_3}
- end on
- on tp_bbgs.destroy
- destroy(this.gb_3)
- destroy(this.gb_2)
- destroy(this.gb_1)
- destroy(this.rb_1)
- destroy(this.rb_2)
- destroy(this.rb_3)
- destroy(this.ddlb_1)
- destroy(this.dw_8)
- destroy(this.ddlb_3)
- destroy(this.dw_9)
- destroy(this.ddlb_2)
- destroy(this.ddlb_4)
- destroy(this.rb_6)
- destroy(this.rb_5)
- destroy(this.rb_7)
- destroy(this.rb_9)
- destroy(this.rb_4)
- destroy(this.rb_8)
- destroy(this.rb_10)
- destroy(this.em_1)
- destroy(this.st_3)
- end on
- event constructor;st_3.visible=false
- em_1.visible=false
- end event
- type gb_3 from groupbox within tp_bbgs
- integer x = 1787
- integer y = 792
- integer width = 1024
- integer height = 608
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 80269524
- string text = "内容字体"
- end type
- type gb_2 from groupbox within tp_bbgs
- integer x = 1792
- integer y = 60
- integer width = 1024
- integer height = 608
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 80269524
- string text = "标题字体"
- end type
- type gb_1 from groupbox within tp_bbgs
- integer x = 46
- integer y = 56
- integer width = 1504
- integer height = 1356
- integer taborder = 10
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 80269524
- string text = "数据窗口类型"
- end type
- type rb_1 from radiobutton within tp_bbgs
- event clicked pbm_bnclicked
- integer x = 201
- integer y = 148
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 80269524
- string text = " 1 FreeForm - 表格式(标准宽度)"
- boolean checked = true
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_2 from radiobutton within tp_bbgs
- event clicked pbm_bnclicked
- integer x = 201
- integer y = 228
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 80269524
- string text = " 2 FreeForm - 表格式(压缩宽度)"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_3 from radiobutton within tp_bbgs
- event clicked pbm_bnclicked
- integer x = 201
- integer y = 308
- integer width = 987
- integer height = 92
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 80269524
- string text = " 3 FreeForm - 纯自由式"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type ddlb_1 from dropdownlistbox within tp_bbgs
- event selectionchanged pbm_cbnselchange
- integer x = 1833
- integer y = 136
- integer width = 736
- integer height = 492
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16777215
- string text = "宋体"
- boolean vscrollbar = true
- end type
- event selectionchanged;dw_8.modify("text_1.font.face='"+this.text+"'")
- end event
- type dw_8 from datawindow within tp_bbgs
- integer x = 1829
- integer y = 280
- integer width = 942
- integer height = 356
- integer taborder = 50
- boolean bringtotop = true
- string dataobject = "dw_rpt_font"
- boolean border = false
- boolean livescroll = true
- end type
- type ddlb_3 from dropdownlistbox within tp_bbgs
- event selectionchanged pbm_cbnselchange
- integer x = 1824
- integer y = 868
- integer width = 736
- integer height = 492
- integer taborder = 70
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16777215
- string text = "宋体"
- boolean vscrollbar = true
- end type
- event selectionchanged;dw_9.modify("text_1.font.face='"+this.text+"'")
- end event
- type dw_9 from datawindow within tp_bbgs
- integer x = 1824
- integer y = 1012
- integer width = 942
- integer height = 356
- integer taborder = 80
- boolean bringtotop = true
- string dataobject = "dw_rpt_font"
- boolean border = false
- boolean livescroll = true
- end type
- type ddlb_2 from dropdownlistbox within tp_bbgs
- event selectionchanged pbm_cbnselchange
- integer x = 2578
- integer y = 136
- integer width = 192
- integer height = 492
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16777215
- string text = "18"
- boolean allowedit = true
- boolean sorted = false
- boolean vscrollbar = true
- string item[] = {"8","9","10","11","12","14","16","18","20","22","24","26","28","36","48","72"}
- end type
- event selectionchanged;dw_8.modify("text_1.font.height='"+this.text+"'")
- end event
- type ddlb_4 from dropdownlistbox within tp_bbgs
- event selectionchanged pbm_cbnselchange
- integer x = 2574
- integer y = 868
- integer width = 192
- integer height = 492
- integer taborder = 90
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16777215
- string text = "9"
- boolean allowedit = true
- boolean sorted = false
- boolean vscrollbar = true
- string item[] = {"8","9","10","11","12","14","16","18","20","22","24","26","28","36","48","72"}
- end type
- event selectionchanged;dw_9.modify("text_1.font.height='"+this.text+"'")
- end event
- type rb_6 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 564
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = " 6 Grid - 网格"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_5 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 484
- integer width = 658
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = " 5 N-UP - 格式"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_7 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 644
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = " 7 Label - 标签格式"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_9 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 804
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = " 9 Crosstab - 交叉表"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_4 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 404
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = " 4 Tabular - 格式"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_8 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 724
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = " 8 Graph - 图表"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- end event
- type rb_10 from radiobutton within tp_bbgs
- integer x = 201
- integer y = 884
- integer width = 987
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "10 Composite - 复合表"
- end type
- event clicked;wf_bbgs(text)
- checked=true
- rb_s3.postevent(clicked!)
- end event
- type em_1 from editmask within tp_bbgs
- integer x = 1330
- integer y = 480
- integer width = 178
- integer height = 84
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "2"
- alignment alignment = right!
- borderstyle borderstyle = stylelowered!
- string mask = "0"
- boolean spin = true
- double increment = 1
- end type
- type st_3 from statictext within tp_bbgs
- integer x = 878
- integer y = 492
- integer width = 453
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- boolean enabled = false
- string text = "- 细节区重复行数"
- alignment alignment = center!
- boolean focusrectangle = false
- end type
- type dw11 from datawindow within w_rpt_sql
- boolean visible = false
- integer x = 841
- integer y = 1764
- integer width = 1262
- integer height = 368
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_rpt_column"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean hsplitscroll = true
- boolean livescroll = true
- end type
- type rb_s1 from radiobutton within w_rpt_sql
- integer x = 41
- integer y = 1632
- integer width = 439
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "视图方式"
- boolean checked = true
- end type
- event clicked;ii_sqlno=1
- tab_1.tp_table.visible=true
- tab_1.selecttab(tab_1.tp_table)
- tab_1.tp_sql.visible=true
- tab_1.tp_sql.mle_1.displayonly=true
- tab_1.tp_sql.mle_1.BackColor=80269524
- tab_1.tp_where.visible=true
- tab_1.tp_col.visible=true
- tab_1.tp_sort.visible=true
- tab_1.tp_procedure.visible=false
- tab_1.tp_wbsjy.visible=false
- checked=true
- end event
- type rb_s2 from radiobutton within w_rpt_sql
- integer x = 457
- integer y = 1632
- integer width = 439
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "直接写SQL语句"
- end type
- event clicked;ii_sqlno=2
- tab_1.tp_sql.visible=true
- tab_1.tp_sql.mle_1.displayonly=false
- tab_1.tp_sql.mle_1.BackColor=16777215
- tab_1.selecttab(tab_1.tp_sql)
- tab_1.tp_table.visible=false
- tab_1.tp_where.visible=false
- tab_1.tp_col.visible=false
- tab_1.tp_sort.visible=false
- tab_1.tp_procedure.visible=false
- tab_1.tp_wbsjy.visible=false
- tab_1.tp_sql.mle_1.text=is_sqlselect
- checked=true
- end event
- type rb_s3 from radiobutton within w_rpt_sql
- integer x = 983
- integer y = 1632
- integer width = 439
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "外部数据源"
- end type
- event clicked;ii_sqlno=3
- tab_1.tp_wbsjy.visible=true
- tab_1.selecttab(tab_1.tp_wbsjy)
- tab_1.tp_table.visible=false
- tab_1.tp_where.visible=false
- tab_1.tp_col.visible=false
- tab_1.tp_sort.visible=false
- tab_1.tp_sql.visible=false
- tab_1.tp_procedure.visible=false
- checked=true
- end event
- type rb_s4 from radiobutton within w_rpt_sql
- integer x = 1454
- integer y = 1632
- integer width = 439
- integer height = 76
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "存储过程"
- end type
- event clicked;ii_sqlno=4
- tab_1.tp_procedure.visible=true
- tab_1.tp_table.visible=false
- tab_1.tp_where.visible=false
- tab_1.tp_col.visible=false
- tab_1.tp_sort.visible=false
- tab_1.tp_sql.visible=false
- tab_1.tp_wbsjy.visible=false
- tab_1.selecttab(tab_1.tp_procedure)
- checked=true
- end event
- type cb_yes from commandbutton within w_rpt_sql
- integer x = 2181
- integer y = 1624
- integer width = 265
- integer height = 88
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "确定(&Y)"
- end type
- event clicked;dw11.reset()
- dw02.accepttext()
- dw04.accepttext()
- dw05.accepttext()
- dw06.accepttext()
- dw07.accepttext()
- dw10.accepttext()
- if is_datasource='dw' then//前台
- wf_sql()//处理is_sqlselect和coldw
- else
- choose case ii_sqlno
- case 1//视图方式
- is_procedure=''
- tab_1.event selectionchanged(1,3)//先选字段后再去改选表,需要触发此事件
- wf_sql()//处理is_sqlselect和coldw
- if is_from='' then
- is_temp='请选择表名.'
- goto myerror
- end if
- if ids.rowcount()=0 then
- is_temp='请选择字段.'
- goto myerror
- end if
- if is_where='' and pos(is_from,',')>0 then
- is_temp='请选择关联.'
- goto myerror
- end if
- if wf_dw11(is_sqlselect)=1 then return
- case 2//直接写SQL语句
- is_procedure=''
- s[1]=tab_1.tp_sql.mle_1.text
- if wf_dw11(s[1])=1 then return
- if right(s[1],1)<>'~n' then s[1]=s[1]+'~n'//为了在OPEN事件中好识别是直接写SQL语句
- is_sqlselect=s[1]
- case 3//外部数据源
- is_sqlselect=''
- is_procedure=''
- ii_rows=dw07.rowcount()
- for i=1 to ii_rows
- s[1]=dw07.getitemstring(i,1)
- s[2]=dw07.getitemstring(i,2)
- dw11.insertrow(0)
- dw11.setitem(i,'cname',s[1])
- dw11.setitem(i,'cdbname',s[1])
- dw11.setitem(i,'ctag',s[1])
- if s[2]='decimal' then
- dw11.setitem(i,'ctype','decimal('+string(dw07.object.data[i,4])+')')
- elseif s[2]='string' then
- dw11.setitem(i,'ctype','char('+string(dw07.object.data[i,3])+')')
- else
- dw11.setitem(i,'ctype',s[2])
- end if
- next
- case 4//存储过程//execute dba.sp3 '',''
- is_sqlselect=''
- s[1]=tab_1.tp_procedure.sle_1.text
- s[1]='execute '+s[1]+' '
- ii_rows=dw05.rowcount()
- for i=1 to ii_rows//提取参数
- s[3]=trim(dw05.getitemstring(i,1))
- if s[3]='' then continue
- s[1]=s[1]+':'+s[3]+','
- next
- if right(s[1],1)=',' then s[1]=left(s[1],len(s[1])-1)
- if wf_dw11(s[1])=1 then return
- is_procedure=s[1]
- end choose
- end if
- if ii_bbgs<>9 then//非crosstab
- if istr_rpt.auto='auto' then
- if ii_sqlno=1 and pos(is_from,',')=0 then
- win_parent.is_updatetable=is_from
- end if
- ii_band_size=long(tab_1.tp_bbgs.ddlb_4.text)*4/3
- ii_rows=dw11.rowcount()
- for i=1 to ii_rows
- s[1]=dw11.getitemstring(i,'ctag')
- s[2]=dw11.getitemstring(i,'ctype')
- dw11.setitem(i,'clen1',len(s[1])*ii_band_size/2)//字段标题象素
- dw11.setitem(i,'clen2',min(f_clen(s[2])*ii_band_size/2,800))
- next
- end if
-
- ii_rows=dw11.rowcount()
- for i=1 to ii_rows//恢复设置的initial,value,
- is_temp=dw11.getitemstring(i,'cdbname')
- ii_row=win_parent.dw3.find("cdbname='"+is_temp+"'",1,999)
- if ii_row>0 then
- dw11.setitem(i,'cinitial',win_parent.dw3.getitemstring(ii_row,'cinitial'))
- dw11.setitem(i,'cvalues',win_parent.dw3.getitemstring(ii_row,'cvalues'))
- dw11.setitem(i,'cvalidation',win_parent.dw3.getitemstring(ii_row,'cvalidation'))
- dw11.setitem(i,'cvalidationmsg',win_parent.dw3.getitemstring(ii_row,'cvalidationmsg'))
- dw11.setitem(i,'cidentity',win_parent.dw3.getitemstring(ii_row,'cidentity'))
- end if
- next
-
- win_parent.dw3.reset()
- dw11.RowsCopy(1,dw11.RowCount(),Primary!,win_parent.dw3,1,Primary!)
-
- end if
- if is_datasource<>'dw' then//后台
- wf_arg()
- istr_rpt.rsqlselect=is_sqlselect
- istr_rpt.rarguments=is_arguments
- istr_rpt.rprocedure=is_procedure
- end if
- if istr_rpt.auto='auto' then
- istr_rpt.tt=string(ii_bbgs)
- istr_rpt.t1=tab_1.tp_bbgs.ddlb_1.text//title font name
- istr_rpt.t2=string(round(long(tab_1.tp_bbgs.ddlb_2.text)*4/3,0))//title font size
- istr_rpt.t3=tab_1.tp_bbgs.ddlb_3.text//band font name
- istr_rpt.t4=string(round(long(tab_1.tp_bbgs.ddlb_4.text)*4/3,0))
- istr_rpt.t5=tab_1.tp_bbgs.em_1.text
- end if
- closewithreturn(parent,istr_rpt)
- return
- myerror:
- //清除已经生成的有关字段
- ids.setfilter("")
- ids.setsort("")
- messagebox('提示信息',is_temp)
- return
- end event
- type cb_no from commandbutton within w_rpt_sql
- integer x = 2587
- integer y = 1624
- integer width = 265
- integer height = 88
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "取消(&N)"
- end type
- event clicked;close(parent)
- end event
|