网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 交易代码 > SQL语法 > 正文

TIPTOPgp版多sql报表_cs3

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务

【网学网提醒】:网学会员为广大网友收集整理了,TIPTOPgp版多sql报表_cs3,希望对大家有所帮助!


    #Prog.Version..:'3.50.01-07.04.04(00010)'#Patternname...:aooi010.4gl#Descriptions...:签核人员#Date&;Author..:91/04/11ByLee#Modify:92/05/05ByDavid
    #
    #Modify.........:No:MOD-47040004/07/22ByNicola进入程式,右边有一个放弃的butoom#Modify.........:No:MOD-47051504/10/05ByNicola加入"相关文件"功能#Modify.........:No:FUN-4C004404/12/07BypenguDataandGroup权限控管#Modify.........:No:FUN-51002705/01/13Bypengu报表转XML#Modify.........:No:MOD-53011705/03/16BypenguCALLcl_prt()时参数传错造成无法执行列印#Modify.........:No:FUN-4A008905/04/22Bysaki试做笔数显示#Modify.........:No:MOD-58024205/09/12ByNicolaPAGELENGTHg_line改为g_page_line#Modify.........:No:FUN-64019906/04/19Bysaki新讯息显示范例#Modify.........:TQC-64018706/04/26ByClaireDisplay修改#Modify.........:No:FUN-65019006/06/07ByPenguRINGMENU处有一个退出的BUTTON,与PACKAGE的STYLE不符,建议去掉#Modify.........:No:FUN-66013106/06/19ByCheunlcl_err-->cl_err3#Modify.........:No:FUN-68010206/08/28Byzdyllq类型转换#Modify.........:No:FUN-6A006606/10/20Byatsea将g_no_ask修改为mi_no_ask#Modify.........:No:FUN-6A008106/11/01Byatseal_time转g_time#Modify.........:No.TQC-6B010507/03/07Bycarrier连续两次查询,第二次查不到资料,做修改等操作会将当前笔停在上次查询到的资料上#Modify.........:No.07042407/04/24Bychenl报表范例
    DATABASEds
    GLOBALS"../../config/top.global"
    DEFINEg_azbg_azb_tg_azb01_tg_wc#No.FUN-680102g_sql
    RECORDLIKEazb_file.*,RECORDLIKEazb_file.*,LIKEazb_file.azb01,STRING,#备份旧值#Key值备份#储存user的查询条件#组sql用#No:FUN-580092HCN
    STRING,
    #No.FUN-680102#ROWID使用#No.FUN-680102
    g_azb_rowidLIKEtype_file.chr18INT
    DEFINEg_forupd_sql#No.FUN-680102DEFINEg_before_input_done#No.FUN-680102SMALLINTDEFINEg_chrDEFINEg_cntDEFINEg_i
    STRING
    #SELECT...FORUPDATENOWAITSQL#判断是否已执行BeforeInput指令
    LIKEtype_file.num5
    LIKEazb_file.azbactiLIKEtype_file.num10LIKEtype_file.num5
    #No.FUN-680102VARCHAR(1)#No.FUN-680102INTEGER#count/indexforanypurpose
     #No.FUN-680102SMALLINTDEFINEg_msgDEFINEg_curs_indexDEFINEg_row_countINTEGERDEFINEg_jump#No.FUN-680102INTEGERDEFINEmi_no_askLIKEtype_file.num5#是否开启指定笔视窗LIKEtype_file.num10#查询指定的笔数LIKEtype_file.chr1000LIKEtype_file.num10LIKEtype_file.num10#No.FUN-680102VARCHAR(72)#No.FUN-680102INTEGER#总笔数#No.FUN-680102
    #No.FUN-680102SMALLINT#No.FUN-6A0066###cr_reportDEFINEg_strDEFINEl_tableSTRINGSTRING#No.070424cr修改处
    接续了2个月的繁忙工作,接续了2个月的繁忙工作,这周日将迎来部门Q3季度活动繁华的都市,喧嚣的街道,繁忙的工作,季度活动。的Q3季度活动。繁华的都市,喧嚣
    的街道,繁忙的工作,相信大家都希望在劳累了一天后能有一个属于自己的自由空间,让疲惫的心灵轻松散步,劳累了一天后能有一个属于自己的自由空间,让疲惫的心灵轻松散步,享受休闲生活的美妙。休闲生活的美妙。
    #defineg_sql###cr_reportMAINDEFINEp_row,p_col#l_timeLIKEtype_file.num5LIKEtype_file.chr8#No.FUN-680102SMALLINT#No.FUN-6A0081STRING
    OPTIONSFORMLINEMESSAGELINEPROMPTLINEINPUTNOWRAPDEFERINTERRUPTFIRST+2,LAST,LAST,#画面开始的位置#讯息显示的位置#提示讯息的位置#输入的方式:不打转#撷取中断键
    IF(NOTcl_user())THENEXITPROGRAMENDIF
    WHENEVERERRORCALLcl_err_msg_log
    IF(NOTcl_setup("AOO"))THENEXITPROGRAMENDIF
    ###cr_reportLETg_sql="azb01.azb_file.azb01,","azb02.azb_file.azb02,","azb06.azb_file.azb06,",
     "gen02.gen_file.gen02,","gen03.gen_file.gen03,","gen04.gen_file.gen04,","gem02.gem_file.gem02"LETl_table=cl_prt_temptable('aooi010',g_sql)CLIPPEDIFl_table=-1THENEXITPROGRAMENDIFLETg_sql="INSERTINTOds_report.",l_tableCLIPPED,"VALUES(?,?,?,?,?,?,?)"PREPAREinsert_prepFROMg_sqlIFSTATUSTHENCALLcl_err('insert_prep',STATUS,1)EXITPROGRAMENDIF###cr_report
    LETp_row=ARG_VAL(1)LETp_col=ARG_VAL(2)CALLcl_used(g_prog,g_time,1)RETURNINGg_time#No:MOD-580088HCN20050818
    #No.FUN-6A0081INITIALIZEg_azb.*TONULL
    LETg_forupd_sql="SELECT*FROMazb_fileWHEREROWID=?FORUPDATENOWAIT"DECLAREi010_clCURSORFROMg_forupd_sql#LOCKCURSOR
    LETp_row=5LETp_col=10
    OPENWINDOWi010_wATp_row,p_colWITHFORM"aoo/42f/aooi010"ATTRIBUTE(STYLE=g_win_styleCLIPPED)#No:FUN-580092HCN
    CALLcl_ui_init()
    LETg_action_choice=""CALLi010_menu()
    CLOSEWINDOWi010_wCALLcl_used(g_prog,g_time,2)RETURNINGg_time#No:MOD-580088HCN20050818
    #No.FUN-6A0081ENDMAIN
    FUNCTIONi010_curs()DEFINElsSTRING
    CLEARFORMCONSTRUCTBYNAMEg_wcON#萤幕上取条件
     azb01,azb02,azb06,azbuser,azbgrup,azbmodu,azbdate,azbacti#No:FUN-580031--start-BEFORECONSTRUCTCALLcl_qbe_init()#No:FUN-580031--end-HCNHCN
    ONACTIONcontrolpCASEWHENINFIELD(azb01)CALLcl_init_qry_var()LETg_qryparam.form="q_gen"LETg_qryparam.state="c"LETg_qryparam.default1=g_azb.azb01CALLcl_create_qry()RETURNINGg_qryparam.multiretDISPLAYg_qryparam.multiretTOazb01NEXTFIELDazb01
    OTHERWISEEXITCASEENDCASE
    ONIDLEg_idle_secondsCALLcl_on_idle()CONTINUECONSTRUCT
    ONACTIONaboutCALLcl_about()
    #MOD-4C0121#MOD-4C0121
    ONACTIONhelpCALLcl_show_help()
    #MOD-4C0121#MOD-4C0121
    ONACTIONcontrolgCALLcl_cmdask()
    #MOD-4C0121#MOD-4C0121
    #No:FUN-580031--start--
    HCN
    ONACTIONqbe_selectCALLcl_qbe_select()ONACTIONqbe_saveCALLcl_qbe_save()#No:FUN-580031--end-ENDCONSTRUCTHCN
     #资料权限的检查IFg_priv2='4'THEN#只能使用自己的资料
    LETg_wc=g_wcclipped,"ANDazbuser='",g_user,"'"ENDIFIFg_priv3='4
    'THEN#只能使用相同群的资料
    LETg_wc=g_wcclipped,"ANDazbgrupMATCHES'",g_grupCLIPPED,"*'"ENDIF#TQC-5C0134群组权限
    IFg_priv3MATCHES"[5678]"THEN
    LETg_wc=g_wcclipped,"ANDazbgrupIN",cl_chk_tgrup_list()ENDIFLETg_sql="SELECTROWID,azb01FROMazb_file",#组合出SQL指令"WHERE",g_wcCLIPPED,"ORDERBYazb01"PREPAREi010_prepareFROMg_sqlDECLAREi010_csSCROLLCURSORWITHHOLDFORi010_prepareLETg_sql="SELECTCOUNT(*)FROMazb_fileWHERE",g_wcCLIPPEDPREPAREi010_precountFROMg_sqlDECLAREi010_countCURSORFORi010_precountENDFUNCTION#SCROLLCURSOR
    FUNCTIONi010_menu()
    DEFINEl_cmdMENU""
    LIKEtype_file.chr1000
    #No.FUN-680102CHAR(100)
    BEFOREMENUCALLcl_navigator_setting(g_curs_index,g_row_count)
    ONACTIONinsertLETg_action_choice="insert"IFcl_chk_act_auth()THENCALLi010_a()ENDIFONACTIONqueryLETg_action_choice="query"IFcl_chk_act_auth()THENCALLi010_q()ENDIFONACTIONnextCALLi010_fetch('N')ONACTIONprevious
     CALLi010_fetch('P')ONACTIONmodifyLETg_action_choice="modify"IFcl_chk_act_auth()THENCALLi010_u()ENDIFONACTIONinvalidLETg_action_choice="invalid"IFcl_chk_act_auth()THENCALLi010_x()ENDIFONACTIONdeleteLETg_action_choice="delete"IFcl_chk_act_auth()THENCALLi010_r()ENDIFONACTIONreproduceLETg_action_choice="reproduce"IFcl_chk_act_auth()THENCALLi010_copy()ENDIFONACTIONoutputLETg_action_choice="output"IFcl_chk_act_auth()THENCALLi010_out()ENDIFONACTIONhelpCALLcl_show_help()ONACTIONexitLETg_action_choice="exit"EXITMENU#------------FUN-650190modify###ONACTIONcancel#No:MOD-470400
    LETg_action_choice="exit"EXITMENU
    #------------FUN-650190endONACTIONjumpCALLi010_fetch('/')ONACTIONfirstCALLi010_fetch('F')ONACTIONlastCALLi010_fetch('L')ONACTIONcontrolgCALLcl_cmdask()
     ONACTIONlocaleCALLcl_dynamic_locale()CALLcl_show_fld_cont()ONIDLEg_idle_secondsCALLcl_on_idle()CONTINUEMENU#No:FUN-550037hmf
    ONACTIONaboutCALLcl_about()
    #MOD-4C0121#MOD-4C0121
    COMMANDKEY(INTERRUPT)LETINT_FLAG=FALSELETg_action_choice="exit"EXITMENU#MOD-570244mars
    ONACTIONrelated_document
    #No:MOD-470515
    LETg_action_choice="related_document"IFcl_chk_act_auth()THENIFg_azb.azb01ISNOTNULLTHENLETg_doc.column1="azb01"LETg_doc.value1=g_azb.azb01CALLcl_doc()ENDIFENDIF
    ENDMENUCLOSEi010_csENDFUNCTION
    FUNCTIONi010_a()MESSAGE""CLEARFORMINITIALIZEg_azb.*LIKEazb_file.*LETg_azb01_t=NULLLETg_wc=NULLCALLcl_opmsg('a')WHILETRUELETg_azb.azbuser=g_userLETg_azb.azbgrup=g_grupLETg_azb.azbdate=g_todayLETg_azb.azbacti='Y'CALLi010_i("a")#各栏位输入#使用者所属群#清萤墓栏位内容
     IFINT_FLAGTHENINITIALIZEg_azb.*TONULLLETINT_FLAG=0CALLcl_err('',9001,0)CLEARFORMEXITWHILEENDIFIFg_azb.azb01ISNULLTHENCONTINUEWHILEENDIFINSERTINTOazb_fileVALUES(g_azb.*)IFSQLCA.sqlcode
    THEN#CALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)
    #若按了DEL键
    #KEY不可空白
    #DISKWRITE
    #No:FUN-660131#No:FUN-660131
    CALLcl_err3("ins","azb_file",g_azb.azb01,"",SQLCA.sqlcode,"","",0)CONTINUEWHILEELSESELECTROWIDINTOg_azb_rowidFROMazb_fileWHEREazb01=g_azb.azb01ENDIFEXITWHILEENDWHILELETg_wc=''ENDFUNCTION
    FUNCTIONi010_i(p_cmd)DEFINEp_cmdl_gen02l_gen03l_gen04l_gem02l_inputl_nLIKEtype_file.chr1,LIKEgen_file.gen02,LIKEgen_file.gen03,LIKEgen_file.gen04,LIKEgem_file.gem02,LIKEtype_file.chr1,LIKEtype_file.num5#No:FUN-680102VARCHAR(1),#No.FUN-680102SMALLINT#No.FUN-680102VARCHAR(1)
    DISPLAYBYNAMEg_azb.azb01,g_azb.azb02,g_azb.azb06,g_azb.azbuser,g_azb.azbgrup,g_azb.azbmodu,g_azb.azbdate,g_azb.azbacti
    INPUTBYNAMEg_azb.azb01,g_azb.azb02,g_azb.azb06,g_azb.azbuser,g_azb.azbgrup,g_azb.azbmodu,g_azb.azbdate,g_azb.azbactiWITHOUTDEFAULTS
     BEFOREINPUTLETl_input='N'LETg_before_input_done=FALSECALLi010_set_entry(p_cmd)CALLi010_set_no_entry(p_cmd)LETg_before_input_done=TRUE
    AFTERFIELDazb01DISPLAY"AFTERFIELDazb01"IFg_azb.azb01ISNOTNULLTHENIFp_cmd="a"OR#若输入或更改且改KEY
    (p_cmd="u"ANDg_azb.azb01!=g_azb01_t)THENSELECTcount(*)INTOl_nFROMazb_fileWHEREazb01=g_azb.azb01IFl_n>0THENCALLcl_err(g_azb.azb01,-239,1)LETg_azb.azb01=g_azb01_tDISPLAYBYNAMEg_azb.azb01NEXTFIELDazb01ENDIFCALLi010_azb01('a')IFNOTcl_null(g_errno)THENCALLcl_err('azb01:',g_errno,1)LETg_azb.azb01=g_azb01_tDISPLAYBYNAMEg_azb.azb01NEXTFIELDazb01ENDIFENDIFENDIF#Duplicated
    AFTERINPUTIFINT_FLAGTHENEXITINPUTENDIFIFg_azb.azb01ISNULLTHENDISPLAYBYNAMEg_azb.azb01LETl_input='Y'ENDIFIFl_input='Y'THENNEXTFIELDazb01ENDIF#沿用所有栏位
    ONACTIONCONTROLOIFINFIELD(azb01)THEN
     LETg_azb.*=g_azb_t.*CALLi010_show()NEXTFIELDazb01ENDIF
    ONACTIONcontrolpCASEWHENINFIELD(azb01)CALLcl_init_qry_var()LETg_qryparam.form="q_gen"LETg_qryparam.default1=g_azb.azb01CALLcl_create_qry()RETURNINGg_azb.azb01#CALLFGL_DIALOG_SETBUFFER(g_azb.azb01)DISPLAYBYNAMEg_azb.azb01NEXTFIELDazb01
    OTHERWISEEXITCASEENDCASE
    ONACTIONCONTROLZCALLcl_show_req_fields()
    ONACTIONCONTROLGCALLcl_cmdask()#栏位说明
    ONACTIONCONTROLF
    CALLcl_set_focus_form(ui.Interface.getRootNode())RETURNINGg_fld_name,g_frm_name#Addon040913CALLcl_fldhelp(g_frm_name,g_fld_name,g_lang)#Addon040913
    ONIDLEg_idle_secondsCALLcl_on_idle()CONTINUEINPUT
    ONACTIONaboutCALLcl_about()
    #MOD-4C0121#MOD-4C0121
    ONACTIONhelpCALLcl_show_help()
    #MOD-4C0121#MOD-4C0121
    ENDINPUT
     ENDFUNCTION
    FUNCTIONi010_azb01(p_cmd)DEFINEp_cmdl_gen02l_gen03l_gen04l_genactil_gem02LIKEtype_file.chr1,LIKEgen_file.gen02,LIKEgen_file.gen03,LIKEgen_file.gen04,LIKEgen_file.genacti,LIKEgem_file.gem02#No.FUN-680102VARCHAR(1)
    LETg_errno=''SELECTgen02,gen03,gen04,genactiINTOl_ge
    n02,l_gen03,l_gen04,l_genactiFROMgen_fileWHEREgen01=g_azb.azb01CASEWHENSQLCA.sqlcode=100LETg_errno='aoo-070'LETl_gen02=NULLLETl_gen03=NULLLETl_gen04=NULLWHENl_genacti='N'OTHERWISELETg_errno=SQLCA.sqlcodeUSING'------'ENDCASEIFp_cmd='d'ORcl_null(g_errno)THENDISPLAYl_gen02TOFORMONLY.gen02DISPLAYl_gen03TOFORMONLY.gen03DISPLAYl_gen04TOFORMONLY.gen04SELECTgem02INTOl_gem02FROMgem_fileWHEREgem01=l_gen03IFSQLCA.sqlcodeTHENLETl_gem02=''ENDIFDISPLAYl_gem02TOgem02ENDIFENDFUNCTIONLETg_errno='9028'
    FUNCTIONi010_q()##CKPLETg_row_count=0LETg_curs_index=0CALLcl_navigator_setting(g_curs_index,g_row_count)INITIALIZEg_azb.*TONULLMESSAGE""CALLcl_opmsg('q')#No.FUN-6A0015
     DISPLAY'
    'TOFORMONLYt#宣告SCROLLCURSOR
    CALLi010_curs()IFINT_FLAGTHENLETINT_FLAG=0CLEARFORMRETURNENDIFOPENi010_countFETCHi010_countINTOg_row_countDISPLAYg_row_countTOFORMONLYtOPENi010_csIFSQLCA.sqlcodeTHEN
    #从DB产生合乎条件TEMP(0-30秒)
    CALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)INITIALIZEg_azb.*TONULLELSECALLi010_fetch('F')ENDIFENDFUNCTION#读出TEMP第一笔并显示
    FUNCTIONi010_fetch(p_flazb)DEFINEp_flazbLIKEtype_file.chr1#No:FUN-680102VARCHAR(1)
    CASEp_flazbWHEN'N'FETCHNEXTi010_csINTOg_azb_rowid,g_azb.azb01
    WHEN'P'FETCHPREVIOUSi010_csINTOg_azb_rowid,g_azb.azb01WHEN'F'FETCHFIRSTWHEN'L'FETCHLASTWHEN'/'IF(NOTmi_no_ask)THEN#No.FUN-6A0066i010_csINTOg_azb_rowid,g_azb.azb01i010_csINTOg_azb_rowid,g_azb.azb01
    CALLcl_getmsg('fetch',g_lang)RETURNINGg_msgLETINT_FLAG=0######addforpromptbug
    PROMPTg_msgCLIPPED,':'FORg_jumpONIDLEg_idle_secondsCALLcl_on_idle()
    ONACTIONaboutCALLcl_about()
    #MOD-4C0121#MOD-4C0121
    ONACTIONhelpCALLcl_show_help()
    #MOD-4C0121#MOD-4C0121
    ONACTIONcontrolgCALLcl_cmdask()
    #MOD-4C0121#MOD-4C0121
     ENDPROMPTIFINT_FLAGTHENLETINT_FLAG=0EXITCASEENDIFENDIFFETCHABSOLUTEg_jumpi010_csINTOg_azb_rowid,g_azb.azb01LETmi_no_ask=FALSEENDCASE#No.FUN-6A0066
    IFSQLCA.sqlcodeTHENCALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)INITIALIZEg_azb.*TONULL#TQC-6B0105LETg_azb_rowid=NULLRETURNELSECASEp_flazbWHEN'F'LETg_curs_index=1WHEN'P'LETg_curs_index=g_curs_index-1WHEN'N'LETg_curs_index=g_curs_index+1WHEN'L'LETg_curs_index=g_row_countWHEN'/'LETg_curs_index=g_jumpENDCASE#TQC-6B0105
    CALLcl_navigator_setting(g_curs_index,g_row_count)DISPLAYg_curs_indexTOFORMONLY.idxENDIF#重读DB,因TEMP有不被更新特性#No:FUN-4A0089
    SELECT*INTOg_azb.*FROMazb_fileWHEREROWID=g_azb_rowidIFSQLCA.sqlcodeTHEN#
    CALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)
    #No:FUN-660131#No:FUN-660131
    CALLcl_err3("sel","azb_file",g_azb.azb01,"",SQLCA.sqlcode,"","",0)ELSELETg_data_owner=g_azb.azbuserLETg_data_group=g_azb.azbgrupCALLi010_show()ENDIFENDFUNCTION#重新显示
    #FUN-4C0044权限控管
    FUNCTIONi010_show()LETg_azb_t.*=g_azb.*DISPLAYBYNAMEg_azb.*
     CALLi010_azb01('d')CALLcl_show_fld_cont()ENDFUNCTION#No:FUN-550037hmf
    FUNCTIONi010_u()IFg_azb.azb01ISNULLTHENCALLcl_err('',-400,0)RETURNENDIFSELECT*INTOg_azb.*FROMazb_fileWHEREazb01=g_azb.azb01IFg_azb.azbacti='N'THENCALLcl_err('',9027,0)RETURNENDIFMESSAGE""CALLcl_opmsg('u')LETg_azb01_t=g_azb.azb01BEGINWORK
    OPENi010_clUSINGg_azb_rowidIFSTATUSTHENCALLcl_err("OPENi010_cl:",STATUS,1)CLOSEi010_clROLLBACKWORKRETURNENDIFFETCHi010_clINTOg_azb.*IFSQLCA.sqlcodeTHENCALLcl_err(g_azb.azb01,SQLCA.sqlcode,1)RETURNENDIFLETg_azb.azbmodu=g_userLETg_azb.azbdate=g_todayCALLi010_show()WHILETRUECALLi010_i("u")IFINT_FLAGTHENLETINT_FLAG=0LETg_azb.*=g_azb_t.*CALLi010_show()CALLcl_err('',9001,0)EXITWHILEENDIFUPDATEazb_fileSETazb_file.*=g_azb.*#更新DB#栏位更改#修改者#修改日期#显示最新资料#对DB锁定
     WHEREROWID=g_azb_rowidIFSQLCA.sqlcodeTHEN#CALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)#No:FUN-660131#No:FUN-660131
    CALLcl_err3("upd","azb_file",g_azb.azb01,"",SQLCA.sqlcode,"","",0)CONTINUEWHILEENDIFEXITWHILEENDWHILECLOSEi010_clCOMMITWORKENDFUNCTION
    FUNCTIONi010_x()IFg_azb.azb01ISNULLTHENCALLcl_err('',-400,0)RETURNENDIFBEGINWORK
    OPENi010_clUSINGg_azb_rowidIFSTATUSTHENCALLcl_err("OPENi010_cl:",STATUS,1)CLOSEi010_clROLLBACKWORKRETURNENDIFFETCHi010_clINTOg_azb.*IFSQLCA.sqlcodeTHENCALLcl_err(g_azb.azb01,SQLCA.sqlcode,1)RETURNENDIFCALLi010_show()IFcl_exp(0,0,g_azb.azbacti)THENLETg_chr=g_azb.azbactiIFg_azb.azbacti='Y'THENLETg_azb.azbacti='N'ELSELETg_azb.azbacti='Y'ENDIFUPDATEazb_fileSETazbacti=g_azb.azbactiWHEREROWID=g_azb_rowidIFSQLCA.SQLERRD[3]=0THENCALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)
     LETg_azb.azbacti=g_chrENDIFDISPLAYBYNAMEg_azb.azbactiENDIFCLOSEi010_clCOMMITWORKENDFUNCTION
    FUNCTIONi010_r()IFg_azb.azb01ISNULLTHENCALLcl_err('',-400,0)RETURNENDIFBEGINWORK
    OPENi010_clUSINGg_azb_rowidIFSTATUSTHENCALLcl_err("OPENi010_cl:",STATUS,0)CLOSEi010_clROLLBACKWORKRETURNENDIFFETCHi010_clINTOg_azb.*IFSQLCA.sqlcodeTHENCALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)RETURNENDIFCALLi010_show()IFcl_delete()THENDELETEFROMazb_fileWHEREazb01=g_azb.azb01CLEARFORMOPENi010_countFETCHi010_countINTOg_row_countDISPLAYg_row_countTOFORMONLYtOPENi010_csIFg_curs_index=g_row_count+1THENLETg_jump=g_row_countCALLi010_fetch('L')ELSELETg_jump=g_curs_indexLETmi_no_ask=TRUECALLi010_fetch('/')ENDIFENDIF#No.FUN-6A0066
     CLOSEi010_clCOMMITWORKENDFUNCTION
    FUNCTIONi010_copy()DEFINEl_newnol_oldnop_cmdl_inputLIKEazb_file.azb01,LIKEazb_file.azb01,LIKEtype_file.chr1,LIKEtype_file.chr1#No.FUN-680102VARCHAR(1)#No:FUN-680102VARCHAR(1)
    IFg_azb.azb01ISNULLTHENCALLcl_err('',-400,0)
    RETURNENDIF
    LETl_input='N'LETg_before_input_done=FALSECALLi010_set_entry('a')LETg_before_input_done=TRUEINPUTl_newnoFROMazb01
    AFTERFIELDazb01IFl_newnoISNOTNULLTHENSELECTcount(*)INTOg_cntFROMazb_fileWHEREazb01=l_newnoIFg_cnt>0THENCALLcl_err(l_newno,-239,0)NEXTFIELDazb01ENDIFSELECTgen01FROMgen_fileWHEREgen01=l_newnoIFSQLCA.sqlcodeTHENDISPLAYBYNAMEg_azb.azb01LETl_newno=NULLNEXTFIELDazb01ENDIFENDIF#沿用所有栏位
    ONACTIONcontrolpIFINFIELD(azb01)THENCALLcl_init_qry_var()LETg_qryparam.form="q_gen"
     LETg_qryparam.default1=g_azb.azb01CALLcl_create_qry()RETURNINGl_newno#CALLFGL_DIALOG_SETBUFFER(l_newno)#DISPLAYBYNAMEl_newnoDISPLAYl_newnoTOazb01SELECTgen01FROMgen_fileWHEREgen01=l_newnoIFSQLCA.sqlcodeTHENDISPLAYBYNAMEg_azb.azb01LETl_newno=NULLNEXTFIELDazb01ENDIFNEXTFIELDazb01ENDIFONIDLEg_idle_secondsCALLcl_on_idle()CONTINUEINPUT#TQC-640187mark#TQC-640187
    ONACTIONaboutCALLcl_about()
    #MOD-4C0121#MOD-4C0121
    ONACTIONhelpCALLcl_show_help()
    #MOD-4C0121#MOD-4C0121
    ONACTIONcontrolgCALLcl_cmdask()
    #MOD-4C0121#MOD-4C0121
    ENDINPUTIFINT_FLAGTHENLETINT_FLAG=0DISPLAYBYNAMEg_azb.azb01RETURNENDIFDROPTABLExSELECT*FROMazb_fileWHEREROWID=g_azb_rowidINTOTEMPxUPDATExSETazb01=l_newno,azbacti='Y',azbuser=g_user,azbgrup=g_grup,#资料键值#资料有效码#资料所有者#资料所有者所属群
     azbmodu=NULL,azbdate=g_todayINSERTINTOazb_fileSELECT*FROMxIFSQLCA.sqlcodeTHEN#
    #资料修改日期#资料建立日期
    CALLcl_err(g_azb.azb01,SQLCA.sqlcode,0)
    #No:FUN-660131#No:FUN-660131
    CALLcl_err3("ins","azb_file",g_azb.azb01,"",SQLCA.sqlcode,"","",0)ELSEMESSAGE'ROW(',l_newno,')O.K'LETl_oldno=g_azb.azb01LETg_azb.azb01=l_newnoSELECTROWID,azb_file.*INTOg_azb_rowid,g_azb.*FROMazb_fileWHEREazb01=l_newnoCALLi010_u()SELECTROWID,azb_file.*INTOg_azb_rowid,g_azb.*FROMazb_fileWHEREazb01=l_oldnoENDIFLETg_azb.azb01=l_oldnoCALLi010_show()ENDFUNCTION
    FUNCTIONi010_out()DEFINEl_il_azbl_genl_name#No.FUN-680102VARCHAR(20)#cr报表,在此处做检查。srRECORDazb01LIKEazb_file.azb01,azb02LIKEazb_file.azb02,azb06LIKEazb_file.azb06,gen02LIKEgen_file.gen02,gen03LIKEgen_file.gen03,gen04LIKEgen_file.gen04,gem02LIKEgem_file.gem02ENDRECORD,l_za05LIKEza_file.za05#No.FUN-680102VARCHAR(40)LIKEtype_file.num5,RECORDLIKEazb_file.*,RECORDLIKEgen_file.*,LIKEtype_file.chr20,#External(Disk)filename#No.FUN-680102SMALLINT
    #BugNO:4137IFg_wcISNULLTHENLETg_wc="azb01='",g_azb.azb01,"'"ENDIF#改成印当下的那一笔资料内容
     CALLcl_wait()#cr报表修改处#SELECTzo02INTOg_companyFROMzo_fileWHEREzo01=g_lang#LETg_sql="SELECTazb01,azb02,azb06,gen02,gen03,gen04,gem02",###"FROMazb_file,OUTER(gen_file,OUTER(gem_file))","WHEREgen_file.gen01=azb01ANDgem_f
    ile.gem01=gen_file.gen03","AND",g_wcCLIPPED
    LETg_sql="SELECTazb01,azb02,azb06FROMazb_file","WHERE",g_wcCLIPPED{IFcl_null(g_wc)THENLETg_sql=g_sqlCLIPPED,"azb01='",g_azb.azb01,"'"ELSELETg_sql=g_sqlCLIPPED,"AND",g_wcCLIPPEDENDIF}#RUNTIME编译#SCROLLCURSOR
    PREPAREi010_p1FROMg_sqlDECLAREi010_curoCURSORFORi010_p1#cr报表修改处#CALLcl_outnam('aooi010')RETURNINGl_name#STARTREPORTi010_repTOl_name#cr报表修改处
    FOREACHi010_curoINTOsr.azb01,sr.azb02,sr.azb06IFSQLCA.sqlcodeTHENCALLcl_err('foreach:',SQLCA.sqlcode,1)EXITFOREACHENDIFIFNOTcl_null(sr.azb01)THENSELECTgen02,gen03,gen04INTOsr.gen02,sr.gen03,sr.gen04FROMgen_fileWHEREgen01=sr.azb01ENDIFIFNOTcl_null(sr.gen03)THENSELECTgem02INTOsr.gem02FROMgem_fileWHEREgem01=sr.gen03ENDIFEXECUTEinsert_prepUSINGsr.*#cr报表修改处#OUTPUTTOREPORTi010_rep(sr.*)ENDFOREACH
     #cr报表修改处#FINISHREPORTi010_rep
    CLOSEi010_curo
    ERROR""#------------MOD-530117--------------------------#CALLcl_prt(l_name,'g_prtway','g_copies',g_len)#cr报表修改处#CALLcl_prt(l_name,g_prtway,g_copies,g_len)#-------END---------------------------------LETg_sql="SELECT*FROM",g_cr_db_strCLIPPED,l_tableCLIPPEDLETg_str=''LETg_str=g_wc,';','test'CALLcl_prt_cs3('axmr701','axmr701_cs3',g_sql,g_str)#END--No.070424ENDFUNCTION#BEGIN--cr报表修改处#REPORTi010_rep(sr)#######################FORMATPAGEHEADERPRINTCOLUMN((g_len-FGL_WIDTH(g_companyCLIPPED))/2)+1,g_companyCLIPPEDPRINTCOLUMN((g_len-FGL_WIDTH(g_x[1]))/2)+1,g_x[1]ORDERBYsr.azb01OUTPUTTOPMARGINg_top_marginLEFTMARGINg_left_marginBOTTOMMARGINg_bottom_marginPAGELENGTHg_page_line#No:MOD-580242DEFINEl_trailer_swsrRECORDazb01LIKEazb_file.azb01,azb02LIKEazb_file.azb02,azb06LIKEazb_file.azb06,gen02LIKEgen_file.gen02,gen03LIKEgen_file.gen03,gen04LIKEgen_file.gen04,gem02LIKEgem_file.gem02ENDRECORDLIKEtype_file.chr1,#No:FUN-680102VARCHAR(1)cr报表修改处
     ##############################
    LETg_pageno=g_pageno+1LETpageno_total=PAGENOUSING'<<<',"/pageno"PRINTg_headCLIPPED,pageno_totalPRINTg_dash[1,g_len]PRINTg_x[31]CLIPPED,g_x[32]CLIPPED,g_x[33]CLIPPED,g_x[34]CLIPPED,g_x[35]CLIPPEDPRINTg_dash1LETl_trailer_sw='y'
    ONEVERYROWPRINTCOLUMNg_c[31],sr.azb01,COLUMNg_c[32],sr.gen02,COLUMNg_c[33],sr.gen03,COLUMNg_c[34],sr.gen04,COLUMNg_c[35],cl_numfor(sr.azb06,35,g_azi04)
    ONLASTROWPRINTg_dash[1,g_len]PRINTg_x[4],g_x[5]CLIPPED,COLUMN(g_len-9),g_x[7]CLIPPEDLETl_trailer_sw='n'
    PAGETRAILERIFl_trailer_sw='y'THENPRINTg_dash[1,g_len]PRINTg_x[4],g_x[5]CLIPPED,COLUMN(g_len-9),g_x[6]CLIPPEDELSESKIP2LINEENDIF
    #ENDREPORT#END--cr报表修改处
    FUNCTIONi010_set_entry(p_cmd)DEFINEp_cmdLIKEtype_file.chr1#No.FUN-680102VARCHAR(1)
    IFp_cmd='a'
    AND(NOTg
    _before_input_done)THEN
    CALLcl_set_comp_entry("azb01",TRUE)ENDIF
    ENDFUNCTION
    FUNCTIONi010_set_no_entry(p_cmd)DEFINEp_cmdLIKEtype_file.chr1#No.FUN-680102VARCHAR(1)
     IFp_cmd='u'ANDg_chkey='N'THENCALLcl_set_comp_entry("azb01",FALSE)ENDIF
    ENDFUNCTION
    
    
  • 上一篇资讯: Transact-SQL语法规则.doc
  • 下一篇资讯: T-SQL语法大全
  • 设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
    版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师