TIPTOP二次開發(fā)結(jié)構(gòu)_第1頁(yè)
TIPTOP二次開發(fā)結(jié)構(gòu)_第2頁(yè)
TIPTOP二次開發(fā)結(jié)構(gòu)_第3頁(yè)
TIPTOP二次開發(fā)結(jié)構(gòu)_第4頁(yè)
TIPTOP二次開發(fā)結(jié)構(gòu)_第5頁(yè)
已閱讀5頁(yè),還剩5頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、2012-3-1 tiptop報(bào)表程式結(jié)構(gòu)tiptop 報(bào)表程式結(jié)構(gòu)(1)變量聲明部分(2)main(3)_tm函數(shù)(4)報(bào)表輸出函數(shù)(相當(dāng)show)1)變量聲明部分database dsglobals 變量名 #全局變量定義define 變量名 record end record #記錄集變量定義define 變量名 record like 表 #記錄集變量定義define 變量名 like 表.字段 #局部變量定義2)main 賦值初始變量cl_user #檢查用戶是否存在cl_setup #程式預(yù)設(shè)檢查cl_used #記錄程式使用時(shí)間定義g_sql的水晶報(bào)表的結(jié)構(gòu),作用于xml轉(zhuǎn)換格式

2、如下:生成temp表let l_table =cl_prt_temptable(報(bào)表程式名,g_sql) clippedcall _tm函數(shù) #輸入打印條件 input print conditioncall 報(bào)表輸入函數(shù) #調(diào)用報(bào)表輸出函數(shù) read data and create out-filecl_used #記錄程式使用時(shí)間3)_tm函數(shù)局變量定義open window 路徑 #打開界面路徑cl_ui_init #初始化變量值initialize tm.* to null #給所有tm.*的變量賦空值while true #循環(huán)執(zhí)行菜單顯示construct by name 變量名

3、on 查詢條件字段,. before construct cl_qbe_init #qbe查詢條件初始化on action 菜單項(xiàng) #具體菜單名on idle #閑置時(shí)間設(shè)置input by name 變量名 without defaults before input cl_qbe_display_condition()after filed4)報(bào)表輸出函數(shù)定義屏幕變量sr記錄集格式如下:define sr record . end recordcl_del_data(l_table) #清空臨時(shí)表記錄集let g_sql=insert into ,g_cr_db_str,clipped,l_

4、table clipped, values(.)prepare insert_prep from g_sql #插入臨時(shí)表l_table的記錄let l_sql=. #show 記錄數(shù)據(jù)的sqla語(yǔ)句prepare 變量名 from l_sql #預(yù)編譯sql語(yǔ)句declare 游標(biāo)變量名 cursor for 預(yù)編譯sql變量名foreach 游標(biāo)變量名 into sr.* #循環(huán)讀取記錄到屏幕變量 .execute insert_prep using sr.*end foreachlet g_sql= select * from ,g_cr_db_str clipped,l_table c

5、lipped #生成水晶報(bào)表記錄集let g_str=. #給水晶報(bào)表中的26個(gè)參數(shù)傳值,切記要對(duì)應(yīng)變量call cl_prt_cs3(報(bào)表程式名,報(bào)表程式名,g_sql,g_str) 2009-09-11 tiptop單頭單檔程式結(jié)構(gòu)定義變量main函數(shù)_cs函數(shù) _menu菜單函數(shù)_a函數(shù)_i函數(shù)_q函數(shù)_fetch函數(shù)_show函數(shù)_u函數(shù)_x函數(shù)_r函數(shù)_copy函數(shù)_out函數(shù)_chkym檢查日期函數(shù)1)定義變量定義數(shù)據(jù)庫(kù)路徑database ds 定義全局變量文件路徑globals .定義記錄集變量define 變量名 record like 表2)main函數(shù)options #改

6、變系統(tǒng)預(yù)設(shè)值form line #窗口開始的位置message line #信息提示的位置prompt line #提示信息的位置cl_user #檢查用戶帳號(hào)cl_setup #檢查程式設(shè)置路徑cl_used #記錄程式使用時(shí)間定義水晶報(bào)表結(jié)構(gòu),.cl_prt_temptable() #創(chuàng)建臨時(shí)表記錄水晶報(bào)表記錄集插入記錄let g_sql=insert into ds_report ,l_table,clipped .open window #打開窗口cl_ui_init() #設(shè)定程式初始化call _menu #打開菜單close window #關(guān)閉窗口cl_used3)_cs函數(shù)c

7、lear form #清除屏幕construct by name 變量名 on 字段變量名,. #取屏幕變量條件before construct cl_qbe_init()on action .on idle . cl_on_idle() continue constructend construct定義查詢sql語(yǔ)句定義游標(biāo)記錄集4)_menu菜單函數(shù)before menu cl_navigator_setting() #上下記錄數(shù)據(jù)移動(dòng)on action .on idle . cl_on_idle continue menuend menu5)_a函數(shù)clear form #清除屏幕cl_

8、opmsg #定義程式操作類型while truecall _i #調(diào)用_i函數(shù)插入記錄insert into 表 values(屏幕變量名.*) #插入記錄數(shù)據(jù)exit whileend while6)_i函數(shù)display by name 字段變量名,.input by name 字段變量名,. without defautlsbefore inputafter field .on action .on idle . cl_on_idle() continue inputend input7)_q函數(shù)cl_navigator_setting() #上下記錄數(shù)據(jù)移動(dòng)cl_opmsg #定義程

9、式操作類型call _cs #調(diào)用查詢函數(shù)定義游標(biāo)記錄集call _fetch #8)_fetch函數(shù)prompt .on idle . cl_on_idleon action .end promptcl_navigator_setting #上下筆記錄移動(dòng)select * into 屏幕變量名.* from 表 #讀取記錄數(shù)據(jù)給屏幕變量call _show #調(diào)用顯示函數(shù)顯示當(dāng)前記錄9)_show函數(shù)display by name 字段變量,.10)_u函數(shù)cl_opmsg #定義程式操作類型begin work #打開工作區(qū)call _show #顯示記錄while truecall _i

10、(u) #欄位修改update 表 #更新記錄數(shù)據(jù)exit whileend whilecommit work #提交數(shù)據(jù)11)_x函數(shù)begin work #打開工作區(qū)定義游標(biāo)記錄集call _show #顯示記錄cl_exp #詢問是否設(shè)置無(wú)效update 表 #更新記錄commit work #提交數(shù)據(jù)12)_r函數(shù)begin work #打開工作區(qū)定義游標(biāo)記錄集call _show #顯示記錄cl_delete #詢問是否要?jiǎng)h除記錄delete from 表 #刪除記錄commit work #提交數(shù)據(jù)13)_copy函數(shù) #復(fù)制函數(shù)input 字段變量名,. from 字段變量名,.

11、after field .on action .on idle . cl_on_idle continue inputend inputdrop table 臨時(shí)表 #刪除臨時(shí)表into temp 臨時(shí)表 #插入臨時(shí)表update 表 . #更新臨時(shí)表的關(guān)鍵資料字段insert into 表 select * from 臨時(shí)表 #將臨時(shí)表中的記錄插入到正式表中.call _show #顯示記錄14)_out函數(shù) #報(bào)表輸出函數(shù)cl_del_data #清空臨時(shí)表中的記錄cl_wait #等待顯示定義游標(biāo)記錄集foreach 游標(biāo)變量名 into 屏幕變量名.* # 循環(huán)讀取記錄到屏幕變量.ex

12、ecute 插入預(yù)編譯sql變量 using 屏幕變量名.*end foreachclose 游標(biāo)記錄集call cl_prt_cs3 #2009-09-09 tiptop單身單檔錄入程式結(jié)構(gòu)定義變量main函數(shù)_menu菜單函數(shù)_q函數(shù)_b函數(shù)_b_askkey函數(shù)_b_fill函數(shù)_bp函數(shù)_set_entry函數(shù)_set_no_entry函數(shù)1)定義變量定義數(shù)據(jù)庫(kù)路徑database ds定義全局變量路徑globals .定義動(dòng)態(tài)數(shù)組變量define 動(dòng)態(tài)變量名 array of record . end record2)main函數(shù)options #改變系統(tǒng)預(yù)設(shè)值form line #

13、窗口開始的位置message line #訊息顯示的位置prompt line #提示訊息的位置cl_user #檢查用戶帳號(hào)cl_setup #檢查程式路徑cl_used #記錄程式使用時(shí)間open wihdow #打開窗口cl_ui_init #程式設(shè)定初始化call _menu #打開菜單close window #關(guān)閉窗口cl_used #記錄程式使用時(shí)間3)_menu菜單函數(shù)while truecase g_action_choice.end caseend while4)_q函數(shù)_askkey #調(diào)用_askkey函數(shù),不明白為何這樣做?5)_b函數(shù)cl_opmsg #定義程式操作

14、類型cl_detail_input_auth(.) #檢查單身是否有insert或是delete權(quán)限input array 變量名 without defaults from 屏幕變量名.* attribute(count=變量名,maxcount=變量名,unbuffered, insert row =單身變量,delete row =單身變量,append row=單身變量)before input fgl_set_arr_curr() #此函數(shù)找不到不知何作用before row begin work #工作區(qū)定義before insertafter insert inser into

15、. values . #插入記錄 commit work #提交數(shù)據(jù)after field . next field .before delete delete from . #刪除記錄 commit work #提交數(shù)據(jù)on row change update . #更新數(shù)據(jù) commit work #提交數(shù)據(jù)after row commit work #提交數(shù)據(jù)on action .on idle . cl_on_idle continue inputend inputcommit work6)_askkey函數(shù)clear form #清除窗口 .construct 變量名 on 字段變量

16、,. from 字段變量,.on action .on idle . cl_on_idle continue constructend constructcall _b_fill填充函數(shù)7)_b_fill 填充函數(shù)let g_sql=. #定義sql語(yǔ)句prepare 變量名 from g_sql #預(yù)編譯sql語(yǔ)句declear 游標(biāo)變量名 cursor for 預(yù)編譯變量名foreach 游標(biāo)變量名 into 動(dòng)態(tài)數(shù)組變量名.* .end foreach8)_bp函數(shù)cl_set_act_setting #顯示確定與退出按鈕提示display array 動(dòng)態(tài)數(shù)組變量名 to 屏幕變量名.

17、* attribute(count=記錄數(shù)變量名)before row cl_show_fld_cont #定義p_per檔特殊格式欄位on action .exit displayafter display continue displayend display9)_set_entry與_set_no_entry函數(shù)cl_set_comp_entry() #設(shè)置欄位是否可以輸入2009-09-09 tiptop查詢式報(bào)表程式結(jié)構(gòu)定義變量main函數(shù)_cs函數(shù)_menu函數(shù)_q函數(shù)_b_fill函數(shù)_bp函數(shù)1)定義變量定義數(shù)據(jù)庫(kù)路徑database ds定義全局變量文件路徑globals .

18、定義動(dòng)態(tài)數(shù)組define 數(shù)組變量名 dynamic array of record . end record2)main函數(shù)options #改變系統(tǒng)預(yù)設(shè)置值form line #窗口開始位置message line #訊息顯示的位置prompt line #提示訊息的位置cl_suer #用戶帳號(hào)的檢查cl_setup #程式路徑檢查cl_used #程式使用時(shí)間記錄open window #窗口打開cl_ui_init #程式設(shè)定初始化call _menu #菜單顯示close window #關(guān)閉窗口cl_used #記錄程式使用時(shí)間3)_cs qbe查詢函數(shù)clear form #清

19、空窗口.initialize tm.* to null #清空條件變量值input by name 變量名 without defaultson action .on idle . cl_on_idle() continue input.end inputconstruct 變量名 on 字段變量名,. from 字段變量名,. before construct cl_qbe_init()on action .on idle . cl_on_idle() continue constructend constructlet g_tw=. #查詢條件變量值組合4)_menu菜單函數(shù)while true_

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論