[Main] dbuse(true) initparam(printMode,reportId,dt_from,dt_to,uri_no,tokui_cd,syohin_nm,han_name,dst_filename,seikyu_s_id,option1,option2,group_no,option3,option4,option5,option6,option7,den_s_id,syukka_req_mng_id,eig_cd,input_dt_from,input_dt_to) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords) loop(PrintNormal,@rs1,Key1,Key2) printreport($printMode,true,false) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords] new($param) addparam($param,$dt_from) addparam($param,$dt_to) addparam($param,$uri_no) addparam($param,$tokui_cd) addparam($param,$han_name) addparam($param,$eig_cd) addparam($param,$input_dt_from) addparam($param,$input_dt_to) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(@rs1.eig_cd) keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] deforgpage(blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,false) deforgpage(formats) resetorg() putcell(2,2,$han_name) putcell(4,2,@rs1.eig_cd) putcell(4,3,@rs1.eig_nm) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] pageclose(false) #------------------------------------------------- # Key2設定ルーチン #------------------------------------------------- [KeyInfo_key2] keyvalue(@rs1.eig_cd,@rs1.den_no) keybreakproc(GroupBegin_key2,GroupEnd_key2) #------------------------------------------------- # Key2開始時 #------------------------------------------------- [GroupBegin_key2] #伝票ヘッダ formatspecialrow($_row,0,8,1) putcell($_row,5,@rs1.syori_ymd) putcell($_row,8,@rs1.nonyu_ymd) putcell($_row,15,@rs1.tok_cd) putcell($_row,17,@rs1.tok_nm) putcell($_row,31,@rs1.kanri_no) putcell($_row,35,@rs1.tok_hacyu_no) putcell($_row,40,@rs1.tan_cd) putcell($_row,42,@rs1.tan_nm) putline(,@rs1.den_no#,,,,,,,,,@rs1.den_kbn_nm#,,@rs1.via_flg_nm#) setdouble($suryo_kei,@rs1.suryo_kei) setdouble($kingaku_kei,@rs1.kingaku_kei) concatenate($w_biko1,@rs1.biko1) concatenate($w_biko2,@rs1.biko2) #------------------------------------------------- # Key2終了時 #------------------------------------------------- [GroupEnd_key2] #伝票フッタ formatspecialrow($_row,0,11,3) putline(,,,,,,,,,,,,,,,,,,,,,,,合計#,$suryo_kei#,,,#,,,,#,,,,$kingaku_kei#) putcell($_row,3,$w_biko1) putline() putcell($_row,3,$w_biko2) putline() #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] case($hosoku_dtl,@rs1.hosoku2,,0,1) case($sonota_dtl,@rs1.hosoku2,,1,0) iterate(PrintNormal_Hosoku,$hosoku_dtl) iterate(PrintNormal_Sonota,$sonota_dtl) putline(,,@rs1.rel_row_no#,,,,,,,,,,,,,,,,,,,,,@rs1.price_rank#,@rs1.jucyu_su#,,,@rs1.gentanka#,,,,@rs1.tanka#,,,,@rs1.kingaku#) [PrintNormal_Hosoku] #明細表示処理 formatspecialrow($_row,0,9,1) putcell($_row,4,@rs1.hin_cd) putcell($_row,11,@rs1.hin_nm) [PrintNormal_Sonota] #明細表示処理 formatspecialrow($_row,0,10,1) putcell($_row,4,@rs1.hin_cd) putcell($_row,7,@rs1.hin_nm)