Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Matrix Report Headache
Thenardier_at_POBoxes.com wrote:
> hi folks,
>
> i'm working on a report which shows the total sales figures of each
> sales person for the last 12 months. i want the report to look like this:
>
> (current mth)
> Name 12/1997 01/1998 02/1998 ... ... 11/1998 Total
> ------ ------- ------- ------- ... ... ------- -------
> SalesA 10 10 20 ... ... 1 999
> SalesB 10 10 20 ... ... 1 999
> SalesC 10 10 20 ... ... 1 999
> ...
>
> u can see the month range is dynamic.
>
> i know that matrix report can help me to build a report like this.
> my headache is, say, if there is a month in which no sales is made.
> (everything can happen, who know? :) ) the corresponding column
> will disappear! then i'll propably see 02/1998 column followed by
> 04/1998. but i need to show the sales figures are 0s in 03/1998!
>
> what should i do?
>
> thanx in advance.
>
> thenard
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Maybe the nvl function can help you. It works like:
select nvl(my_col, '123') from my_tab;
Everytime my_col is NULL '123' is returned.
The problem is I don't know if there is even a null value available.
The other way is to create a dummy table containing names of months. Fill it
with
a small procedure with all names of months lets say from 01/1997 to 01/2100
and use this table in your matrix report.
Marcel Received on Tue Nov 03 1998 - 00:00:00 CST