Skip to main content



      Home
Home » Archived » BIRT » IF statement in SQL query or also possible in BIRT report?
IF statement in SQL query or also possible in BIRT report? [message #108239] Thu, 12 January 2006 09:59 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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!
>
>
Previous Topic:Ability to set the width in a cell via scripting?
Next Topic:UI Layout for Parameter Screen
Goto Forum:
  


Current Time: Tue Sep 16 02:33:53 EDT 2025

Powered by FUDForum. Page generated in 0.03157 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top