Home » Developer & Programmer » Reports & Discoverer » Count multiple items (Discoverer Desktop Edition 4.1)
Count multiple items [message #361476] Wed, 26 November 2008 10:13 Go to next message
Messages: 1
Registered: November 2008
Junior Member
Hi all,

I am trying to have Discoverer run a very simple query, but it doesn't seem to allow me to run multiple counts within the same report. The below code was written in SQL Developer and I want to recreate it in Discoverer. I am just simply trying to get a count of the number of POs and number of PO lines created by buyer, but when I try a count of the PO lines and a count_distinct on the POs I get the correct number of lines (as it is the lowest part of the hierarchy), but I just simply get a '1' in the po_count field for each row.

select      per.full_name buyer,
            count(distinct hdr.po_header_id) po_count,
            count(lne.po_line_id) po_line_count
from        po.po_headers_all hdr,
            po.po_lines_all lne,
            apps.per_people_f per
where       hdr.agent_id = per.person_id 
            and hdr.po_header_id = lne.po_header_id 
group by    per.full_name

Any help is greatly appreciated. Thanks in advance.

Re: Count multiple items [message #364604 is a reply to message #361476] Tue, 09 December 2008 04:27 Go to previous message
Messages: 269
Registered: September 2007
Senior Member

I am using the same query which you posted.. i am getting result. What do you want exactly?
Previous Topic: get_application_property(username) in reports
Next Topic: reports server failed
Goto Forum:

Current Time: Sat Aug 19 11:57:36 CDT 2017

Total time taken to generate the page: 0.06095 seconds