In an Oracle Report:
I am writing a report that breaks on the first 4 fields. That part is working fine. I also want a count for each Group (the 4 fields), and a grand total. Since I want to break on all 4 fields as if they are one combined field, I made a concatenated column (called Break_key) and had the report total on that.
I was surprised when the count appeared at the top of each group, rather than at the bottom. The grand total is at the very bottom of the report, as I would have thought. How can I get the sub-totals at the bottom, rather than the top?
Thanks, Wayne
Report Builder 9.0.4.0.33
My query:
select distinct
fs.FUNDING_SOURCE ,
lpad(l.circuit, 2, '0') circuit,
l.DEPARTMENT ,
l.REIMB_TYPE ,
p.POSITION_NO ,
decode (p.position_type, 'F', 'Full', 'S', 'Shared') position_type ,
ph.phasein,
(case ph.status
when 'F' then 'Filled'
when 'H' then 'Hold'
when 'V' then 'Vacant'
when 'Z' then 'Frozen'
else ' ' end) Position_Status,
p.position_active,
ph.abbrev_ttl title ,
ph.aoic_code ,
fs.FUNDING_SOURCE||lpad(l.circuit, 2, '0')||l.DEPARTMENT||l.REIMB_TYPE Break_key
from position p,
pos_history ph,
location l,
funding_source fs
where p.position_id = ph.position_id
and l.location_id = ph.location_id
and fs.SOURCE_ID = l.SOURCE_ID
and
( ( haseIn_or_Shared = 'P' and ph.phasein = 'Y' )
or ( haseIn_or_Shared = 'S' and p.position_type = 'S' ) )
and fs.source_id = nvlP_FUNDING_SOURCE, fs.source_id)
and ltrim(rtrim(upper(l.circuit))) = ltrim(rtrim(upper(nvlP_CIRCUIT, l.circuit))))
and ltrim(rtrim(upper(l.department))) = ltrim(rtrim(upper(nvlP_DEPARTMENT, l.department))))
order by 1, 2, 3, 4, 5;
I am writing a report that breaks on the first 4 fields. That part is working fine. I also want a count for each Group (the 4 fields), and a grand total. Since I want to break on all 4 fields as if they are one combined field, I made a concatenated column (called Break_key) and had the report total on that.
I was surprised when the count appeared at the top of each group, rather than at the bottom. The grand total is at the very bottom of the report, as I would have thought. How can I get the sub-totals at the bottom, rather than the top?
Thanks, Wayne
Report Builder 9.0.4.0.33
My query:
select distinct
fs.FUNDING_SOURCE ,
lpad(l.circuit, 2, '0') circuit,
l.DEPARTMENT ,
l.REIMB_TYPE ,
p.POSITION_NO ,
decode (p.position_type, 'F', 'Full', 'S', 'Shared') position_type ,
ph.phasein,
(case ph.status
when 'F' then 'Filled'
when 'H' then 'Hold'
when 'V' then 'Vacant'
when 'Z' then 'Frozen'
else ' ' end) Position_Status,
p.position_active,
ph.abbrev_ttl title ,
ph.aoic_code ,
fs.FUNDING_SOURCE||lpad(l.circuit, 2, '0')||l.DEPARTMENT||l.REIMB_TYPE Break_key
from position p,
pos_history ph,
location l,
funding_source fs
where p.position_id = ph.position_id
and l.location_id = ph.location_id
and fs.SOURCE_ID = l.SOURCE_ID
and
( ( haseIn_or_Shared = 'P' and ph.phasein = 'Y' )
or ( haseIn_or_Shared = 'S' and p.position_type = 'S' ) )
and fs.source_id = nvlP_FUNDING_SOURCE, fs.source_id)
and ltrim(rtrim(upper(l.circuit))) = ltrim(rtrim(upper(nvlP_CIRCUIT, l.circuit))))
and ltrim(rtrim(upper(l.department))) = ltrim(rtrim(upper(nvlP_DEPARTMENT, l.department))))
order by 1, 2, 3, 4, 5;