Page 1 of 2

null text box

Posted: Wed Jul 28, 2010 3:19 pm
by majidsoft
hi i have a databand that contain fields that have read information from sql when report read data with null the field is present 0 i dont want to show 0 but i have a 0 in my data base if i click hide zero my data is disappear to i want to use average in end of my data band too but i dont want to use null object in databand my suffix of data is double
thanks

null text box

Posted: Thu Jul 29, 2010 1:12 am
by Andrew
Hello,

Please use {DataSource["ColumnName"] == DBNull.Value ? "" : DataSource.ColumnName.ToString()} for displaying Null values.

Thank you.

null text box

Posted: Thu Jul 29, 2010 7:03 am
by majidsoft
thank you
but when i want to use avg for this column avg calculate null field if i want to not calculate null field what can i do

null text box

Posted: Thu Jul 29, 2010 8:02 am
by Alex K.
Hello,

In any case, whether Null values are present or not, the Avg function returns the correct value.
If our explanation does not help you, please send us a test report sample.

Thank you.

null text box

Posted: Thu Jul 29, 2010 3:50 pm
by majidsoft
hi
here you can compare two avg on column have null value and another column have zero value
thanks

null text box

Posted: Fri Jul 30, 2010 2:16 am
by Alex K.
Hello,

If you do not want to take into account the Null values, please instead of expression

{Avg(DataTable1,Table1.mp)}

use the following expression:

{Avg(DataTable1,Table1["mp"])}

Thank you.

null text box

Posted: Fri Jul 30, 2010 7:59 am
by majidsoft
thank you
bye

null text box

Posted: Fri Jul 30, 2010 8:38 am
by Andrew
Have a nice day!

null text box

Posted: Mon Aug 02, 2010 2:13 pm
by majidsoft
hi
i use your code in my field but when i want to read information from sql server when i use that code my field in stimul convert to string and the filed in sql is real and when i use filter to reduce decimal number to 2 digit because field is converting to string reducing decimal not working if i want to use else in my code to if field not null ic contain in real format what can i do
and if i want to for example write a symbol like '-' for null value what can i do
thanks

null text box

Posted: Mon Aug 02, 2010 4:25 pm
by Jan
Hello,

Please show me your expression.

Thank you.