Category: PIPER-Rx Reports (Free) Name: FWF002-11 Aged Workflows By Workflow (Month) ReportDefFileName: .\FWF002-11 Aged Workflows By Workflow (Month).fr3 ===Begin Comments=== Copyright (C) 2009 G Piper This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. a copy of the GNU Affero General Public Licenses provided is part of the down load Terms and Conditions available on our site www.piper-rx.com or you can refere to www.gnu.org/licenses/gpl.html ===End Comments=== ===Begin SQL=== -- **************************************************** -- ** PIPER-RX - Free Reports -- ** -- ** Copyright (C) 2009 G.Piper -- ** -- ** From AUSOAUG eTraining Webcast By G.Piper - November 2008 -- ** -- ** Step 2 Aged Workflows By Workflow (Month) -- ** -- ** ------------------------------------------------- -- ** Version 1.0 Nov-08 G.Piper - PIPER-Rx -- ** Version 1.1 Aug-09 G.Piper Referenced GV$DATABASE -- **************************************************** SELECT to_char(sysdate, 'DD-Mon-YY HH24:MI') report_date, report_headings.sid_name sid_name, wi.item_type workflow, substr(witt.display_name,1,60) display_name, wi.item_key , to_char(wi.begin_date, 'DD-Mon-YY HH24:MI') begin_date, decode( trunc(months_between (sysdate, wi.begin_date)), 0, 1, 0 ) "Current", decode( trunc(months_between (sysdate, wi.begin_date)), 1, 1, 0 ) "30 Day", decode( trunc(months_between (sysdate, wi.begin_date)), 2, 1, 0 ) "60 Day", decode( trunc(months_between (sysdate, wi.begin_date)), 3, 1, 0 ) "90 Day", decode( trunc(months_between (sysdate, wi.begin_date)), null, 0, 0, 0, 1, 0, 2, 0, 3, 0, 1 ) "120 + Days", trunc(months_between (sysdate , wi.begin_date)) age_months FROM applsys.wf_items wi, applsys.wf_item_types_tl witt, (SELECT vd.name sid_name FROM gv$database vd WHERE vd.inst_id = 1) report_headings WHERE wi.end_date is null -- Active workflows and wi.item_type = witt.name and witt.language = userenv('LANG') and wi.item_type = upper(:WORKFLOW) ORDER by wi.begin_date ===End SQL=== ParamName: workflow ParamType: String ParamValue: apexp ParamExp: ===Begin Report Definition===