reportguy2000
Programmer
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
------
ACCOUNT_NUM ACCOUNT_NAME GBLOC AVG(FF.Q4) AVG(FF.Q5) COUNT(1)
----------- ------------------------------ ---- ---------- ---------- ----------
24 TEST1 NAME HAFC 12 12 1
160 TEST2 AME KKFA 12 12 1
1 TEST3 NAME HAFC 9.75 11.25 4
1200 TEST4 NAME KKFA 9.6 11.4 5
5164 TEST5 NAME MLNQ 9.375 8.625 8
1 TEST6 NAME GTFL 8.76923077 9.69230769 13
Now, I want to show only the account_num if it's 1 and GBLOC = GTFL.
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. 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.
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
------
ACCOUNT_NUM ACCOUNT_NAME GBLOC AVG(FF.Q4) AVG(FF.Q5) COUNT(1)
----------- ------------------------------ ---- ---------- ---------- ----------
24 TEST1 NAME HAFC 12 12 1
160 TEST2 AME KKFA 12 12 1
1 TEST3 NAME HAFC 9.75 11.25 4
1200 TEST4 NAME KKFA 9.6 11.4 5
5164 TEST5 NAME MLNQ 9.375 8.625 8
1 TEST6 NAME GTFL 8.76923077 9.69230769 13
Now, I want to show only the account_num if it's 1 and GBLOC = GTFL.
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. 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.