I have some records with null currency values but I can't find a way to display $0.00 in the column rather than blanks. Is there an easy way to do this ie without reverting to calc fields?
There is a global display format class that is used for all of the formatting in ReportBuilder. You can override the built-in formatting by creating a custom display format class and registering it with ReportBuilder.
Check out RBuilder\Source\ppDisplayFormat.pas for the source code to the default class. The registration code is in the Initialization section at the bottom of the unit.
So this is not supported natively? I would have thought it would makes sense to display zero if a numeric value was null. I've tried using a display format eg $#,0.00;-$#,0.00;$0.00 , shouldn't the third format would be used if zero (or null). There is also a ZeroWhenBlank option which also seems to be ignored if result is null.
Comments
There is a global display format class that is used for all of the
formatting in ReportBuilder.
You can override the built-in formatting by creating a custom display format
class and registering it with ReportBuilder.
Check out RBuilder\Source\ppDisplayFormat.pas for the source code to the
default class. The registration code is in the Initialization section at the
bottom of the unit.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
So this is not supported natively? I would have thought it would makes
sense to display zero if a numeric value was null. I've tried using a
display format eg $#,0.00;-$#,0.00;$0.00 , shouldn't the third format would
be used if zero (or null). There is also a ZeroWhenBlank option which also
seems to be ignored if result is null.
Regards
Alex
You can also implement the DBText.OnFormat event-handler to customize the
default behavior.
Thanks for the feedback. Sorry, it is not natively handled the way that you
envision.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com