[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) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords) loop(PrintNormal,@rs1,Key1,key2,key3) #printreport($printMode,true,,BASB0010:BASR0520) printreport($printMode,true) #------------------------------------------------- # 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) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # ヘッダ作成処理 #------------------------------------------------- [CleateHeader] #ヘッダ処理_ヘッダ putcell(9,1,$han_name) putcell(11,1,抽出条件:)#debug #ヘッダ処理_明細ヘッダ setdouble($row_head,14) concatenate($st_ymd,$taisyo_y,/,$taisyo_m,/,01) putcell($row_head,6,$st_ymd) #------------------------------------------------- # グラフ表示処理 #------------------------------------------------- [SettingGraphData] #年度_初期値 setdouble($hyouji_y,$taisyo_y) #年度_開始月 putcell(4,6,$st_ymd) #年度_今年 concatenate($nendo,$hyouji_y,年度) putcell(5,5,$nendo) sum($hyouji_y,-1) putcell(5,6,@rs1.arari01) putcell(5,7,@rs1.arari02) putcell(5,8,@rs1.arari03) putcell(5,9,@rs1.arari04) putcell(5,10,@rs1.arari05) putcell(5,11,@rs1.arari06) putcell(5,12,@rs1.arari07) putcell(5,13,@rs1.arari08) putcell(5,14,@rs1.arari09) putcell(5,15,@rs1.arari10) putcell(5,16,@rs1.arari11) putcell(5,17,@rs1.arari12) #------------------------------------------------- # 見出し行処理 #------------------------------------------------- [CreateMidashi] formatspecialrow($_row,0,7,1) #見出し行処理 putcell($_row,1,@rs1.cd) putcell($_row,2,@rs1.han) putline(,) sum($row_no,1) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(dummy) keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] deforgpage(blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,false) deforgpage(formats) resetorg() #ヘッダ作成処理 subroutine(CleateHeader) setdouble($row_no,$_row) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] #グラフ作成処理 subroutine(SettingGraphData) pageclose(false) #------------------------------------------------- # Key2設定ルーチン #------------------------------------------------- [KeyInfo_key2] keyvalue(@rs1.kbn) keybreakproc(GroupBegin_key2,GroupEnd_key2) #------------------------------------------------- # Key2開始時 #------------------------------------------------- [GroupBegin_key2] setdouble($kbn,@rs1.kbn) #------------------------------------------------- # Key2終了時 #------------------------------------------------- [GroupEnd_key2] case($gokei,$kbn,1,0,1) #見出し行処理 iterate(Creategokei,$gokei) [Creategokei] setdouble($row_no_copy,$row_no) sum($row_no_copy,-1) formatspecialrow($row_no_copy,0,13,1) #------------------------------------------------- # Key3設定ルーチン #------------------------------------------------- [KeyInfo_key3] keyvalue(@rs1.kbn,@rs1.cd) keybreakproc(GroupBegin_key3,GroupEnd_key3) #------------------------------------------------- # Key3開始時 #------------------------------------------------- [GroupBegin_key3] case($midashi,@rs1.cd,,0,1) #見出し行処理 iterate(CreateMidashi,$midashi) #------------------------------------------------- # Key3終了時 #------------------------------------------------- [GroupEnd_key3] #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] formatspecialrow($_row,0,10,1) putcell($_row,2,@rs1.tok_cd) putcell($_row,3,@rs1.tok_rnm) #年度に対象年をセット #setdouble($hyouji_y,$taisyo_y) #concatenate($nendo,$hyouji_y,年度) #putcell($_row,4,$nendo) #putcell($_row,5,売上額) putline(,,,,,@rs1.uri01#,@rs1.uri02#,@rs1.uri03#,@rs1.uri04#,@rs1.uri05#,@rs1.uri06#,@rs1.uri07#,@rs1.uri08#,@rs1.uri09#,@rs1.uri10#,@rs1.uri11#,@rs1.uri12#,@rs1.uri_kei#,@rs1.uri_kei_ly#,@rs1.uri_taihi#) sum($row_no,1)