[Main] dbuse(true) initparam(printMode,reportId,month_fr,month_to) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords) loop(PrintNormal,@rs1,Key1) printreport($printMode,true) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(DUMMY) keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] deforgpage(blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,false) deforgpage(formats) resetorg() #開始行番号 setdouble($row_no,5) #ヘッダ処理 putcell(1,1,@rs1.calendar) #フッタ処理 putcell(37,2,@rs1.freight_a_weigth) putcell(38,2,@rs1.adjust_a_weigth) putcell(37,7,@rs1.freight_b_weigth) putcell(38,7,@rs1.adjust_b_weigth) putcell(37,12,@rs1.freight_c_weigth) putcell(38,12,@rs1.adjust_c_weigth) putcell(37,17,@rs1.freight_all_weigth) putcell(38,17,@rs1.adjust_all_weigth) putcell(37,5,@rs1.freight_a) putcell(38,5,@rs1.adjust_a) putcell(37,10,@rs1.freight_b) putcell(38,10,@rs1.adjust_b) putcell(37,15,@rs1.freight_c) putcell(38,15,@rs1.adjust_c) putcell(37,20,@rs1.freight_all) putcell(38,20,@rs1.adjust_all) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] pageclose(false) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords] new($param) addparam($param,$month_fr) addparam($param,$month_to) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] putline(@rs1.weight_wp_a#,@rs1.sumweight_wp_a#,@rs1.money_wp_a#,@rs1.summoney_wp_a#,,@rs1.weight_wp_b#,@rs1.sumweight_wp_b#,@rs1.money_wp_b#,@rs1.summoney_wp_b#,,@rs1.weight_wp_c#,@rs1.sumweight_wp_c#,@rs1.money_wp_c#,@rs1.summoney_wp_c#,,@rs1.weight_wp_all#,@rs1.sumweight_wp_all#,@rs1.money_wp_all#,@rs1.summoney_wp_all#,,) putformula($row_no,22,RC[-21]) putformula($row_no,6,IF\x28ISERROR\x28RC[-1]\x2FRC[-3]\x29\x2C\x30\x2CRC[-1]\x2FRC[-3]\x29) putformula($row_no,11,IF\x28ISERROR\x28RC[-1]\x2FRC[-3]\x29\x2C\x30\x2CRC[-1]\x2FRC[-3]\x29) putformula($row_no,16,IF\x28ISERROR\x28RC[-1]\x2FRC[-3]\x29\x2C\x30\x2CRC[-1]\x2FRC[-3]\x29) putformula($row_no,21,IF\x28ISERROR\x28RC[-1]\x2FRC[-3]\x29\x2C\x30\x2CRC[-1]\x2FRC[-3]\x29) sum($row_no,1)