Hi,

I am trying to generate a report in Oracle Report6i and I want to show only certain records from a set of output by the query using formula.

Here is my query:

select f.account_num, f.account_name, s.origin_gbloc, avg(ff.q4), avg(ff.q5), count(1)
from f01names2 f, ff_cust_survey ff, shipment s
where ff.gbl_to = s.gbl_to
and f.account_num = s.origin_agent
group by f.account_num, f.account_name, s.origin_gbloc
order by avg(ff.q4) DESC

OUTPUT
------

Code:
ACCOUNT_NUM ACCOUNT_NAME   GBLOC  AVG(FF.Q4)  AVG(FF.Q5)  COUNT(1)
----------- ----------     ----  ---------   ---------   -------
160          NAME1         KKFA         12         12          1
178 	     NAME2	   EBAK         12         12          1
200 	     NAME3	   CHAT         12          6          1
1 	     NAME4	   KKFA        6.6        7.2          5
1 	     NAME5	   GTFL        8.8         10         15
From this result, I want to show only those scores where account_num is 1 and GBLOC = 'GTFL'.
And also show those where account_num is not 1.

I tried to do it in my formula column and assigned it to my place holders in the same query group but it would always give me fatal formula error or now it's working but scores are all the same for all records. Can anyone suggest a way to do this sort of thing? I have worked with report pretty much but I just can figure it out how to do it. Thanks a lot.