IF statement in SQL query or also possible in BIRT report? [message #108239] |
Thu, 12 January 2006 09:59  |
Eclipse User |
|
|
|
Hello,
I have a report which results some cells with NULL as result, which causes
an error in executing the BIRT report.
(There are error(s) in Chart : null )
So my idea is to use the IF statement of SQL:
select if (ColumnA > 0, ColumnA, 0)
so it results the value of ColumnA if it is bigger than zero and 0
otherwise.
My problem now is, i don't have a simple ColumnA in my query, but a huge
subquery which I must enter twice in the if statement.
Is there a way to correct the NULL (empty) values by BIRT?
Any help is appreciated!
Thanks!
|
|
|
Re: IF statement in SQL query or also possible in BIRT report? [message #108745 is a reply to message #108239] |
Thu, 12 January 2006 16:33  |
Eclipse User |
|
|
|
You can use the onFetch method of the data set to modify the input values. I
believe examples of this technique have already been discussed on this group
and have code snippets.
--
Jane Tatchell
BIRT documentation lead
"Mr. Burns" <Mr._Burns@web.de> wrote in message
news:dq5qse$1ve$1@utils.eclipse.org...
> Hello,
>
> I have a report which results some cells with NULL as result, which causes
> an error in executing the BIRT report.
> (There are error(s) in Chart : null )
>
> So my idea is to use the IF statement of SQL:
>
> select if (ColumnA > 0, ColumnA, 0)
>
> so it results the value of ColumnA if it is bigger than zero and 0
> otherwise.
>
> My problem now is, i don't have a simple ColumnA in my query, but a huge
> subquery which I must enter twice in the if statement.
>
> Is there a way to correct the NULL (empty) values by BIRT?
>
> Any help is appreciated!
>
> Thanks!
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03157 seconds