Blank data need to show zero
I have a question similiar to a recent one. I want to know how to make a
DBText component to display 0 or better yet, $0.00 when there is no value.
Actually the value is null.
I am using an aggregatge query where I query the sum of Debits and sum of
Credits grouped by account. The results will be a situation where the
record returns something like the following:
Account: 11200
Debits: $500.00
Credits: Null
The SQL behaviour is such that it returns null. We obviously have to
display the line because it had debits but no credits. Therefore it is not a
no data behavior issue but rather a null value issue.
I realize I can solve with a variable component but that adds code and I
have this issue a lot.
I am sure there is a simple way to tell it to display 0 on numeric fields
when they are null.
Your help is appreciated.
Thanks,
Bob
DBText component to display 0 or better yet, $0.00 when there is no value.
Actually the value is null.
I am using an aggregatge query where I query the sum of Debits and sum of
Credits grouped by account. The results will be a situation where the
record returns something like the following:
Account: 11200
Debits: $500.00
Credits: Null
The SQL behaviour is such that it returns null. We obviously have to
display the line because it had debits but no credits. Therefore it is not a
no data behavior issue but rather a null value issue.
I realize I can solve with a variable component but that adds code and I
have this issue a lot.
I am sure there is a simple way to tell it to display 0 on numeric fields
when they are null.
Your help is appreciated.
Thanks,
Bob
This discussion has been closed.
Comments
Try using the OnGetText event to check the value of the datafield and set
the text of the DBText object accordingly. For instance if the field value
is null, simply set the text parameter to '$0.00'.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
save a lot of people a lot of unnecessarily wasted time coding and
debugging! Not complaining just suggesting...
Branden Johnson
great.
Just a suggestion to an already great product.
Thanks
Bob