Home » Developer & Programmer » Reports & Discoverer » Counting records on a report.
Counting records on a report. [message #90309] Thu, 27 January 2005 08:49 Go to next message
vozdra
Messages: 1
Registered: January 2005
Junior Member
Hello,
I'm using oracle reports builder 10g. I created a report, and I need to put a "counter" at the bottom of the report for a column called "id", but only where "id" is 5. I don't need to count other ids.
The problem is, if I use oracle built-in COUNT function, it counts everything in that column, and I am having a hard time to restrict it to only count where "id" = 5.
Please let me know if you have any suggestions.

Thanks,
Vozdra.
Re: Counting records on a report. [message #90317 is a reply to message #90309] Fri, 28 January 2005 05:53 Go to previous message
ÇÊ
Messages: 15
Registered: September 2002
Junior Member
Create a placeholder column for your count in the group that contains your id.

Create a formula column with code that looks something like this:

BEGIN
IF :id = 5 THEN
:counter := :counter + 1;
END IF;
RETURN 1;
END;
Previous Topic: reports error
Next Topic: parameter in lov of another parameter
Goto Forum:
  


Current Time: Sun May 12 15:16:58 CDT 2024