Home » Developer & Programmer » Reports & Discoverer » Challenging Experts (reports 6i)
icon14.gif  Challenging Experts [message #297484] Fri, 01 February 2008 00:28 Go to next message
satish_dba
Messages: 9
Registered: February 2008
Location: BANGALORE
Junior Member

Hi Experts,


Here i'm facing one problem in Reports 6i. I'm getting data from query using union all. In which i'm able to get data from single column , but bifurcating based on flag i.e F,V ( F- Fixed,V-variable).

my problem is to get 0 (zero) where ever data is not there.

for example:

amount ---- flag
1000 ---- F
2000 ---- F
3000 ---- V
4000 ---- V
5000 ---- V

I supposed to get data like

F ---- V
1000 ---- 0
2000 ---- 0
0 ---- 3000
0 ---- 4000
0 ---- 5000

but i'm getting some space at 0 (zeros). like

F ---- V
1000 ----
2000 ----
---- 3000
---- 4000
---- 5000


please help me anyone to comeout of this

please
please

Regards,
SATISH

[Updated on: Fri, 01 February 2008 02:22]

Report message to a moderator

Re: Challenging Experts [message #297504 is a reply to message #297484] Fri, 01 February 2008 03:02 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Use the DECODE function:
SQL> select * From test;

    AMOUNT F
---------- -
      1000 F
      2000 F
      3000 V
      4000 V
      5000 V

SQL> select decode(flag, 'F', amount, 0) f,
  2         decode(flag, 'V', amount, 0) v
  3  from test;

         F          V
---------- ----------
      1000          0
      2000          0
         0       3000
         0       4000
         0       5000

SQL>
Re: Challenging Experts [message #297506 is a reply to message #297504] Fri, 01 February 2008 03:12 Go to previous messageGo to next message
satish_dba
Messages: 9
Registered: February 2008
Location: BANGALORE
Junior Member

Thanx for your reply...
i have used in that way, it was displaying properly...
but one thing i want to know...
why con't we do for field (matrix cell) properties when other columns are getting correct.

Re: Challenging Experts [message #297524 is a reply to message #297506] Fri, 01 February 2008 04:12 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
satish_dba wrote on Fri, 01 February 2008 10:12

why con't we do for field (matrix cell) properties when other columns are getting correct.

I'm sorry, I didn't understand what you meant to say.
Re: Challenging Experts [message #297534 is a reply to message #297484] Fri, 01 February 2008 04:42 Go to previous message
kkinapps
Messages: 29
Registered: November 2006
Location: Hyderabad
Junior Member

Hi

Open the property palette of the matrix cell..and enter value '0' for the property Value if null

Regards
KK
Previous Topic: parameters
Next Topic: syntax error
Goto Forum:
  


Current Time: Tue Nov 26 22:49:42 CST 2024