Empty DBText
Hi there!
I am using RB 7.03 Enterprise with D5. I have a report and a curious
thing:
I have a DBText with like this
object ppDBText10: TppDBText
UserName = 'DBText10'
AutoSize = True
DataField = '01NP'
DataPipeline = pipeUmsatz
DisplayFormat = '#,0.00;-#,0.00'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Name = 'Roman LQ 15cpi'
Font.Size = 8
Font.Style = []
TextAlignment = taRightJustified
Transparent = True
DataPipelineName = 'pipeUmsatz'
mmHeight = 3387
mmLeft = 114279
mmTop = 0
mmWidth = 12700
BandType = 4
end
this shows nothing when the Value is 0 when I make a Variable like this
object ppVariable9: TppVariable
UserName = 'Variable2'
CalcOrder = 2
Color = clFuchsia
DataType = dtDouble
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Name = 'Roman LQ 15cpi'
Font.Size = 8
Font.Style = []
mmHeight = 3260
mmLeft = 84931
mmTop = 5292
mmWidth = 11938
BandType = 4
end
The OnCalc is like this:
Value := Umsatz['01NP'];
it is showing a 0 and not a blank! What could this be?
Gruß aus den Bergen
Günter
I am using RB 7.03 Enterprise with D5. I have a report and a curious
thing:
I have a DBText with like this
object ppDBText10: TppDBText
UserName = 'DBText10'
AutoSize = True
DataField = '01NP'
DataPipeline = pipeUmsatz
DisplayFormat = '#,0.00;-#,0.00'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Name = 'Roman LQ 15cpi'
Font.Size = 8
Font.Style = []
TextAlignment = taRightJustified
Transparent = True
DataPipelineName = 'pipeUmsatz'
mmHeight = 3387
mmLeft = 114279
mmTop = 0
mmWidth = 12700
BandType = 4
end
this shows nothing when the Value is 0 when I make a Variable like this
object ppVariable9: TppVariable
UserName = 'Variable2'
CalcOrder = 2
Color = clFuchsia
DataType = dtDouble
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Name = 'Roman LQ 15cpi'
Font.Size = 8
Font.Style = []
mmHeight = 3260
mmLeft = 84931
mmTop = 5292
mmWidth = 11938
BandType = 4
end
The OnCalc is like this:
Value := Umsatz['01NP'];
it is showing a 0 and not a blank! What could this be?
Gruß aus den Bergen
Günter
This discussion has been closed.
Comments
Be sure the DBText.BlankWhenZero property is set to False.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Yeah, you see the part from the DFM/RPT and I did not touch this object
with RAP.
I will try to set every TFloatField to 0 and not to Null when
appending. .... This is working
But I think it is a bug anyway!
Gruß aus den Bergen
Günter
Thanks for the info, I'll check into this and make sure it is no longer
occuring in the latest release.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Is there a patch for RB7? Or please tell me the sourcefile and line?
Gruß aus den Bergen
Günter
Sorry, after reading your last post I'm a bit confused. Are the values in
your database zero or Null? I believe Null values are displayed as empty
strings when encountered by a DBText component.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
No Problem
When I startet the value seams to be null (Delphi-Debugger shows 0 even with
.value) and I can't see a 0 in the report.
Than I changed my source that I made a loop over all Fields and set them to 0
when I make a Insert and the report was running fine.
So I think that RB has a problem with Null in a table (TdxMemTable from
DevExpress) to show 0.
Gruß aus den Bergen
Günter
By default, when ReportBuilder encounters a null record in a numeric field,
it will return blank. This was a design decision we made when writing RB
and have stuck to it ever since. Recently however we have found that some
of our customers want a null field to display 0. It is on our to-do list to
possibly give the user the option to display these records as a 0
automatically. As for now, you can use the OnGetText to check if the value
is null, and assign it 0.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com