How to avoid null values turned to 0?
How to avoid null values turned to 0?
Hi
In my datasource, some values are "null".
But when they are displayed by the report, they are shown as "0". I've selected "Hide zeros" option, except that those values are still taken into account when calculating an average for example.
For my average calculation, I don't want to count only the values that are not "0", because there can be real "0" values. I just want to discard null values.
How to avoid the conversion of null values into "0" values ?
thanks
In my datasource, some values are "null".
But when they are displayed by the report, they are shown as "0". I've selected "Hide zeros" option, except that those values are still taken into account when calculating an average for example.
For my average calculation, I don't want to count only the values that are not "0", because there can be real "0" values. I just want to discard null values.
How to avoid the conversion of null values into "0" values ?
thanks
Re: How to avoid null values turned to 0?
Hello,
Can you please send us a sample report with test data which reproduce the issue for analysis.
Thank you.
Can you please send us a sample report with test data which reproduce the issue for analysis.
Thank you.
Re: How to avoid null values turned to 0?
Yes, here is a sample report + data.
As you can see, for fruit length the average is wrong, because it takes into account the empty values.
For Brix, where there is a "real" 0 value (that's why I don't want to hide zeros in the component options), the average is good.
Thanks for your help.
As you can see, for fruit length the average is wrong, because it takes into account the empty values.
For Brix, where there is a "real" 0 value (that's why I don't want to hide zeros in the component options), the average is good.
Thanks for your help.
- Attachments
-
- report.zip
- (5.08 KiB) Downloaded 242 times
Re: How to avoid null values turned to 0?
Hello.
We have reproduced your issue.
We need some additional time for analysis.
Thank you.
We have reproduced your issue.
We need some additional time for analysis.
Thank you.
Re: How to avoid null values turned to 0?
Hello.
You should set the Convert Nulls property of the report to false
This property didn't work for CSV export.
We have made an improvement. The patch will be available in our next prerelease build tomorrow.
Thank you.
You should set the Convert Nulls property of the report to false
This property didn't work for CSV export.
We have made an improvement. The patch will be available in our next prerelease build tomorrow.
Thank you.
Re: How to avoid null values turned to 0?
Thank you for investigating.
I'm actually not working with a csv file, it was just to provide you with an example. My datasource is an SQL server DB.
I've tried to set the Convert Nulls property to false, but then I'm getting an error "Specified cast is not valid" (before my data are loaded, as I don't even see the form where I'm supposed to choose the parameters).
Would it help if I send you my report (so you could see the code, but datasource won't work)?
Thank you.
I'm actually not working with a csv file, it was just to provide you with an example. My datasource is an SQL server DB.
I've tried to set the Convert Nulls property to false, but then I'm getting an error "Specified cast is not valid" (before my data are loaded, as I don't even see the form where I'm supposed to choose the parameters).
Would it help if I send you my report (so you could see the code, but datasource won't work)?
Thank you.
Re: How to avoid null values turned to 0?
Hello,
Please send us a sample report with test data which reproduce the issue for analysis.
Thank you.
Please send us a sample report with test data which reproduce the issue for analysis.
Thank you.
Re: How to avoid null values turned to 0?
Hello,
Unfortunately, I can't send you a report with test data. As I told you before, my datasource is an SQLserver database.
Nevertheless, I attach to this post my report and a screenshot of the "unvalid cast" error message. Maybe it will help you understand what is happenning. Thank you for your help!
Unfortunately, I can't send you a report with test data. As I told you before, my datasource is an SQLserver database.
Nevertheless, I attach to this post my report and a screenshot of the "unvalid cast" error message. Maybe it will help you understand what is happenning. Thank you for your help!
Re: How to avoid null values turned to 0?
Hello,
Please try to check the last prerelease build and let us know about the result.
Thank you.
Please try to check the last prerelease build and let us know about the result.
Thank you.
Re: How to avoid null values turned to 0?
Hello,
I've finally managed to have the latest prelease build (Stimulsoft Reports.Net 2014.01.08) installed.
I have set the Converts Null property to false.
Now I don't get the same error message, but there is a strange behavior with the average calculations.
In attachment you will find an example of report with data file.
As you can see, the avg calculation is fine for Fruit length column. It is not considering the empty values anymore. But look at the three Flesh firmness columns and at the Brix column. The calculations are wrong or not done. I don't know what's going on...
Can you please help me?
Thanks in advance.
I've finally managed to have the latest prelease build (Stimulsoft Reports.Net 2014.01.08) installed.
I have set the Converts Null property to false.
Now I don't get the same error message, but there is a strange behavior with the average calculations.
In attachment you will find an example of report with data file.
As you can see, the avg calculation is fine for Fruit length column. It is not considering the empty values anymore. But look at the three Flesh firmness columns and at the Brix column. The calculations are wrong or not done. I don't know what's going on...
Can you please help me?
Thanks in advance.
- Attachments
-
- Report.mrt
- (74.85 KiB) Downloaded 298 times
-
- data.csv
- (879 Bytes) Downloaded 199 times