Home » Developer & Programmer » Reports & Discoverer » ORACLE REPORT PLACEHODER COLUMN (merged 2) (D2K 6i, Oracle Database 10g)
ORACLE REPORT PLACEHODER COLUMN (merged 2) [message #558235] Wed, 20 June 2012 06:29 Go to next message
parthiv_t
Messages: 15
Registered: July 2011
Location: ahmedabad
Junior Member
Hello expret
1 problem regarding to oracle report 6i.
I have to hide a repeating frame based on different condition

like DEPTCODE = 1 THEN
return('true');
else
return('true');
end if;


there is 4 record when we select DEPTCODE = 1
and there is 25 records when we select DEPTCODE = 2

now my problem is when I choose DEPTCODE=1
the summary of that report like sum of sal, avg of comm is calculated based in all 29 records.

it happen because of all the summary column is placehoder column not CS.

the calculation of all placehoder column is complex I cant convert it in simple CS.


so how can it possible when i choose DEPTCODE=1 and it shows me
summary of only 4 records.???


Thank You.
Re: ORACLE REPORT PLACEHODER COLUMN [message #558255 is a reply to message #558235] Wed, 20 June 2012 07:14 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you don't want to display the records where deptcode =2 and you don't want to include their values in the summary, why are you selecting them at all?

EDIT: wrong deptcode

[Updated on: Wed, 20 June 2012 07:16]

Report message to a moderator

Re: ORACLE REPORT PLACEHODER COLUMN [message #558320 is a reply to message #558255] Wed, 20 June 2012 15:40 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Additionally: if you know - in advance - which DEPTCODES you'll want to display in a report (how? Via parameter!), then you could include that condition into the WHERE clause. If it is rather complex - no problem either - use lexical variable.
Re: ORACLE REPORT PLACEHODER COLUMN [message #558335 is a reply to message #558320] Wed, 20 June 2012 23:02 Go to previous messageGo to next message
parthiv_t
Messages: 15
Registered: July 2011
Location: ahmedabad
Junior Member
Actully Deptcode=1 is only for example

in My Report the formula function named Revice_service which is return

12-11
23-130

in lots of cases its null



now I had created a parameter in Report builder named 'P_reap'

now P_reap = 'Service' or P_reap ='Non-service'

if I Select P_reap='Service' then in report
shows records only for Revice_service function which values is not null

its showing successfully with the help of conditional formatting of Repeating Frame.

but at summary there is no CS (summary column).

but it is a placeholder column which is based on calculation.

Now when i choose P_reap = 'Service' then report shows record only for
Revice_service function which values is not null.

but in summary it calculate all record
of P_reap = 'Service' and P_reap ='Non-service'






Re: ORACLE REPORT PLACEHODER COLUMN [message #558337 is a reply to message #558335] Thu, 21 June 2012 00:55 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid you didn't understand what I was saying.

Although you hid some records based on some conditions (and you did that in Format Trigger), these values still exist. Any calculation you do must have the same WHERE condition - otherwise, how can you expect it to return correct value?

You mentioned "revice_service function" and I got a feeling that you think that it is a cause of your problems. What prevents you to put that function into the WHERE clause? You can use functions there, don't you know that?
Re: ORACLE REPORT PLACEHODER COLUMN [message #558343 is a reply to message #558337] Thu, 21 June 2012 02:07 Go to previous message
parthiv_t
Messages: 15
Registered: July 2011
Location: ahmedabad
Junior Member
Ok...Smile

THANKS
Littelfoot
Previous Topic: Create Report From Cursor
Next Topic: Columns don't align on 10g Reports off Reports Server
Goto Forum:
  


Current Time: Thu Mar 28 19:21:32 CDT 2024