[Main] dbuse(true) initparam(printMode,reportId,s_id,taisyo_ym) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords) loop(PrintNormal,@rs1,Key0,Key1,Key2) printreport($printMode,true) #------------------------------------------------- # Key0設定ルーチン #------------------------------------------------- [KeyInfo_key0] keyvalue(DUMMY) keybreakproc(GroupBegin_key0,GroupEnd_key0) #------------------------------------------------- # Key0開始時 #------------------------------------------------- [GroupBegin_key0] deforgpage(blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,true) deforgpage(formats) resetorg() #ファイル名作成 #concatenate($book_title,品種別売上粗利明細表,-,$dt_syori) #dstprefix($book_title) #filename($book_title) #concatenate($page_name,$book_title,_) #sheetprefix($page_name) #ヘッダ処理 #putcell(3,3,@rs1.cd_nen_tuki) putcell(3,4,@rs1.sitei_ymd) #putcell(4,3,@rs1.syori_bumon) #------------------------------------------------- # Key0終了時 #------------------------------------------------- [GroupEnd_key0] #FormatNormalするかどうか pageclose(false) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(@rs1.furyo_kbn) #keyvalue(DUMMY) keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] putcell($_row,8,@rs1.furyo_kbn_nm) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] #1空行 #putline() #setborder($_row,$_row,8,8,,,,,,,) #------------------------------------------------- # Key2設定ルーチン #------------------------------------------------- [KeyInfo_key2] keyvalue(@rs1.hakken_kbn_nm) #keyvalue(DUMMY) keybreakproc(GroupBegin_key2,GroupEnd_key2) #------------------------------------------------- # Key2開始時 #------------------------------------------------- [GroupBegin_key2] putcell($_row,1,@rs1.hakken_kbn_nm) #------------------------------------------------- # Key2終了時 #------------------------------------------------- [GroupEnd_key2] #1空行 #putline() HPAGEBREAK($_row) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords] new($param) addparam($param,$s_id) addparam($param,$taisyo_ym) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] setdouble($current_row,$_row) div($current_row,2,$iranai,$remainder) case($original_row,$remainder,1,7,8) #case($original_row,@rs1.seq,1,11,$original_row) #case($original_row,@rs1.seq,3,12,$original_row) #formatspecialrow($current_row,0,$original_row,1) #putline(,,,@rs1.mo_meisai1#,@rs1.mo_arari1#,@rs1.mo_meisai2#,@rs1.mo_arari2#,@rs1.mo_meisai4#,@rs1.mo_arari4#,@rs1.cd_hinshugokei_uri#,@rs1.cd_hinshugokei_arari#) #putline(@rs1.hakken_kbn_nm,,,,,,,@rs1.furyo_kbn_nm,,,,,@rs1.furyo_uti_kbn_nm,,,,,,,,@rs1.1月,,@rs1.2月,,@rs1.3月,,@rs1.4月,,@rs1.5月,,@rs1.6月,,@rs1.7月,,@rs1.8月,,@rs1.9月,,@rs1.10月,,@rs1.11月,,@rs1.12月,,@rs1.合計,) putline(,,,,,,,,,,,,@rs1.furyo_uti_kbn_nm,,,,,,,,@rs1.1月,,@rs1.2月,,@rs1.3月,,@rs1.4月,,@rs1.5月,,@rs1.6月,,@rs1.7月,,@rs1.8月,,@rs1.9月,,@rs1.10月,,@rs1.11月,,@rs1.12月,,@rs1.合計,)