Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want the total of the bottom

Status
Not open for further replies.

waynemck

Programmer
May 5, 2009
6
US
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
( ( :phaseIn_or_Shared = 'P' and ph.phasein = 'Y' )
or ( :phaseIn_or_Shared = 'S' and p.position_type = 'S' ) )

and fs.source_id = nvl:)P_FUNDING_SOURCE, fs.source_id)
and ltrim(rtrim(upper(l.circuit))) = ltrim(rtrim(upper(nvl:)P_CIRCUIT, l.circuit))))
and ltrim(rtrim(upper(l.department))) = ltrim(rtrim(upper(nvl:)P_DEPARTMENT, l.department))))

order by 1, 2, 3, 4, 5;
 
OK, I will now answer my own question. The count for each Group was appearing at the top of each group BECAUSE the concatenated column (4 fields stuck together) was not a column in the report. I have the individual fields, so I did not put the concatenated column in the report. I put the concatenated column in the report, making it not visible, and the sub-total appeared at the bottom like I wanted.

As far as I can tell Oracle Reports will not let you total (i.e count) on more than one column. That is why I was sticking these 4 fields together in the first place.

Wayne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top