Skip to main content



      Home
Home » Archived » BIRT » How to convert NULL values from DB to ""?
How to convert NULL values from DB to ""? [message #261784] Tue, 20 November 2007 11:11 Go to next message
Eclipse UserFriend
In a cell in a table, I want to display this:

"".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])

This throws a TypeError: "Can't find default value for object" if STOREID
in the query returns NULL. How do I solve that?
Re: How to convert NULL values from DB to ""? [message #261861 is a reply to message #261784] Wed, 21 November 2007 09:06 Go to previous messageGo to next message
Eclipse UserFriend
Aaron Digulla wrote:

> In a cell in a table, I want to display this:

> "".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])

> This throws a TypeError: "Can't find default value for object" if STOREID
> in the query returns NULL. How do I solve that?

Apparently, the problem is not that the query returns NULL but that it
returns nothing (the row is not in the database). What is the type of
dataSetRow["STOREID"], if no data could be fetched from the DB?

Regards,

--
Aaron Digulla
Re: How to convert NULL values from DB to ""? [message #261885 is a reply to message #261861] Wed, 21 November 2007 10:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Aaron,

If this cell is in a table that returns no data for the dataset the
expression you have should not be throwing an exception. Where are you
seeing the error?

Jason

Aaron Digulla wrote:
> Aaron Digulla wrote:
>
>> In a cell in a table, I want to display this:
>
>> "".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])
>
>> This throws a TypeError: "Can't find default value for object" if
>> STOREID in the query returns NULL. How do I solve that?
>
> Apparently, the problem is not that the query returns NULL but that it
> returns nothing (the row is not in the database). What is the type of
> dataSetRow["STOREID"], if no data could be fetched from the DB?
>
> Regards,
>
Re: How to convert NULL values from DB to ""? [message #261956 is a reply to message #261885] Thu, 22 November 2007 08:10 Go to previous messageGo to next message
Eclipse UserFriend
Jason Weathersby wrote:

>>> In a cell in a table, I want to display this:
>>
>>> "".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])
>>
>>> This throws a TypeError: "Can't find default value for object"
> If this cell is in a table that returns no data for the dataset the
> expression you have should not be throwing an exception. Where are you
> seeing the error?

In the log. The problem is that the cell is rendered but
dataSetRow["STOREID"] is not initialized because the DB didn't return any
rows.

I tried

dataSetRow["STOREID"] == undefined ? "" : dataSetRow["STOREID"]

and variants thereof, but it seems that dataSetRow itself is not set up
correctly in this case.

Regards,

--
Aaron Digulla
Re: How to convert NULL values from DB to ""? [message #262055 is a reply to message #261956] Mon, 26 November 2007 10:12 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Aaron,

Can you post the report?

Jason

Aaron Digulla wrote:
> Jason Weathersby wrote:
>
>>>> In a cell in a table, I want to display this:
>>>
>>>> "".concat(dataSetRow["STOREID"], " / ", params["sewingStoreNr"])
>>>
>>>> This throws a TypeError: "Can't find default value for object"
>> If this cell is in a table that returns no data for the dataset the
>> expression you have should not be throwing an exception. Where are
>> you seeing the error?
>
> In the log. The problem is that the cell is rendered but
> dataSetRow["STOREID"] is not initialized because the DB didn't return
> any rows.
>
> I tried
>
> dataSetRow["STOREID"] == undefined ? "" : dataSetRow["STOREID"]
>
> and variants thereof, but it seems that dataSetRow itself is not set up
> correctly in this case.
>
> Regards,
>
Previous Topic:TOC in pdf
Next Topic:Change css style through script (Expression Builder)
Goto Forum:
  


Current Time: Sun Jul 27 11:55:48 EDT 2025

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

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

Back to the top