[Main] dbuse(true) initparam(printMode,reportId,han_name,bum_cd,bum_nm,tok_cat_cd,tok_cat_nm,sir_cat_cd,sir_cat_nm,dcat_cd_fr,dcat_cd_to,dcat_nm_fr,dcat_nm_to,cat_cd_fr,cat_cd_to,cat_nm_fr,cat_nm_to,syori_ymd_fr,syori_ymd_to,taisyo_y,taisyo_m,tok_cd_fr,tok_cd_to,sir_cd_fr,sir_cd_to,tan_cd_fr,tan_cd_to,tan_nm_fr,tan_nm_to,hin_cd_fr,hin_cd_to,put_on,shime_dd,s_id,eig_cd_fr,eig_cd_to,output_ymd,ext6,ext7,brand_cd_fr,brand_cd_to,color_cd_fr,color_cd_to,eig_cd) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords) loop(PrintNormal,@rs1,Key1) printreport($printMode,true,false) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords] new($param) addparam($param,$han_name) addparam($param,$bum_cd) addparam($param,$bum_nm) addparam($param,$tok_cat_cd) addparam($param,$tok_cat_nm) addparam($param,$sir_cat_cd) addparam($param,$sir_cat_nm) addparam($param,$dcat_cd_fr) addparam($param,$dcat_cd_to) addparam($param,$dcat_nm_fr) addparam($param,$dcat_nm_to) addparam($param,$cat_cd_fr) addparam($param,$cat_cd_to) addparam($param,$cat_nm_fr) addparam($param,$cat_nm_to) addparam($param,$syori_ymd_fr) addparam($param,$syori_ymd_to) addparam($param,$taisyo_y) addparam($param,$taisyo_m) addparam($param,$tok_cd_fr) addparam($param,$tok_cd_to) addparam($param,$sir_cd_fr) addparam($param,$sir_cd_to) addparam($param,$tan_cd_fr) addparam($param,$tan_cd_to) addparam($param,$tan_nm_fr) addparam($param,$tan_nm_to) addparam($param,$hin_cd_fr) addparam($param,$hin_cd_to) addparam($param,$put_on) addparam($param,$shime_dd) addparam($param,$s_id) addparam($param,$eig_cd_fr) addparam($param,$eig_cd_to) addparam($param,$output_ymd) addparam($param,$ext6) addparam($param,$ext7) addparam($param,$brand_cd_fr) addparam($param,$brand_cd_to) addparam($param,$color_cd_fr) addparam($param,$color_cd_to) addparam($param,$eig_cd) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # #変数_初期化 #------------------------------------------------- [set_variable] #集計:前回請求額_初期化 setdouble($all_zen_seikyu_zan,0) #集計:入金額_初期化 setdouble($all_nyukin_gaku,0) #集計:現金 setdouble($all_genkin,0) #集計:小切手 setdouble($all_kogitte,0) #集計:振込 setdouble($all_furikomi,0) #集計:振込手数料 setdouble($all_tesuryo,0) #集計:手形 setdouble($all_tegata,0) #集計:相殺 setdouble($all_sousai,0) #集計:その他 setdouble($all_sonota,0) #集計:繰越残高_初期化 setdouble($all_kurikoshi_gaku,0) #集計:回収予定額_初期化 setdouble($all_zeinuki_gaku,0) #集計:繰越残高_初期化 setdouble($all_zei_gaku,0) #集計:回収予定額_初期化 setdouble($all_seikyu_zan,0) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(@rs1.seikyu_ymd)#締切日 keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] deforgpage(blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,false) deforgpage(formats) resetorg() #変数_初期化 subroutine(set_variable) #ヘッダ処理_ヘッダー putcell(3,3,@rs1.seikyu_ymd) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] formatspecialrow($_row,0,6,1) #日計_【「帳票名」日計】_結合処理 concatenate($meisai_kei,【,合計,】) #集計 putcell($_row,3,$meisai_kei) putline(,,,$all_zen_seikyu_zan#,$all_genkin#,$all_kogitte#,$all_furikomi#,$all_tesuryo#,$all_tegata#,$all_sousai#,$all_sonota#,$all_nyukin_gaku#,$all_kurikoshi_gaku#,$all_zeinuki_gaku#,$all_zei_gaku#,$all_seikyu_zan#) pageclose(false) #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] #明細表示処理 formatspecialrow($_row,0,5,1) putcell($_row,2,@rs1.tok_cd) putcell($_row,3,@rs1.tok_nm) putcell($_row,17,@rs1.nyukin_yotei_ymd)#回収予定日 putcell($_row,18,@rs1.tori_cond)#回収方法 putline(,,,@rs1.zen_seikyu_zan#,@rs1.genkin#,@rs1.kogitte#,@rs1.furikomi#,@rs1.tesuryo#,@rs1.tegata#,@rs1.sousai#,@rs1.sonota#,@rs1.nyukin_gaku#,@rs1.kurikoshi_gaku#,@rs1.zeinuki_gaku#,@rs1.zei_gaku#,@rs1.seikyu_zan#) #集計:前回請求額 sum($all_zen_seikyu_zan,@rs1.zen_seikyu_zan) #集計:入金額 sum($all_nyukin_gaku,@rs1.nyukin_gaku) #集計:現金 sum($all_genkin,@rs1.genkin) #集計:小切手 sum($all_kogitte,@rs1.kogitte) #集計:振込 sum($all_furikomi,@rs1.furikomi) #集計:振込手数料 sum($all_tesuryo,@rs1.tesuryo) #集計:手形 sum($all_tegata,@rs1.tegata) #集計:相殺 sum($all_sousai,@rs1.sousai) #集計:その他 sum($all_sonota,@rs1.sonota) #集計:繰越残高 sum($all_kurikoshi_gaku,@rs1.kurikoshi_gaku) #集計:回収予定額 sum($all_zeinuki_gaku,@rs1.zeinuki_gaku) #集計:繰越残高 sum($all_zei_gaku,@rs1.zei_gaku) #集計:回収予定額 sum($all_seikyu_zan,@rs1.seikyu_zan)