[Main] dbuse(true) #initparam(printMode,reportId,s_id,tok_cd,seikyu_ymd) initparam(printMode,reportId,s_id,syori_ymd_fr,syori_ymd_to,tok_cd_fr,tok_cd_to,tan_cd_fr,tan_cd_to) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords) loop(PrintNormal,@rs1,Key1) printreport($printMode,true,false) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(dummy) keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] deforgpage(blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,true) deforgpage(formats) resetorg() #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] #FormatNormalするかどうか #formatspecialrow($_row,0,5,1) #putline(,,,,,[総合計]#,,$all_suryo#,,,$all_kungaku#,,$all_arari#) pageclose(false) #------------------------------------------------- # Key2設定ルーチン #------------------------------------------------- [KeyInfo_key2] keyvalue(@rs1.tok_cd) keybreakproc(GroupBegin_key2,GroupEnd_key2) #------------------------------------------------- # Key2開始時 #------------------------------------------------- [GroupBegin_key2] case($close,$r_cnt,0,0,1) iterate(Close,$close) #改ページ #ヘッダ処理_ヘッダー putcell(3,3,@rs1.tok_cd) putcell(3,5,@rs1.tok_nm) setdouble($sum_suryo,0) setdouble($sum_kungaku,0) setdouble($sum_arari,0) #------------------------------------------------- # Key2終了時 #------------------------------------------------- [GroupEnd_key2] #FormatNormalするかどうか formatspecialrow($_row,0,5,1) putline(,,,,,[得意先計]#,,$sum_suryo#,,,$sum_kungaku#,,$sum_arari#) sum($r_cnt,1) #pageclose(true) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords] new($param) #addparam($param,$s_id) addparam($param,$syori_ymd_fr) addparam($param,$syori_ymd_to) addparam($param,$tok_cd_fr) addparam($param,$tok_cd_to) addparam($param,$tan_cd_fr) addparam($param,$tan_cd_to) #addparam($param,$seikyu_ymd) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] formatspecialrow($_row,0,6,1) #putcell($_row,2,@rs1.den_no) putline(,@rs1.tegata_ymd#,@rs1.nyukin_ymd#,@rs1.nyukin_no#,@rs1.tok_cd#,@rs1.tok_nm#,@rs1.total_gaku#,@rs1.tegata_no#,@rs1.biko#) [Close] pageclose(false) pageopen(true,false)