How to avoid null values turned to 0?

Stimulsoft Reports.NET discussion
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to avoid null values turned to 0?

Post by HighAley »

Hello.

We have made some improvements. This report works right now.
But there is one thing that you should know. By default, we use .Net Framework DataSet class. It does not support nullable types. So you should change type of each column where you use aggregate function and could be null values from Decimal to Decimal(nullable).

Please, look at the attached report template.
Report_modified.mrt
(33.01 KiB) Downloaded 173 times
The patch will be available in our next prerelease build on January 17.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: How to avoid null values turned to 0?

Post by Jennypi »

OK I see what you have modified in the new version of the report.
So it means that if I turn those values from Decimal to Decimal(nullable), and install the next prerelease build, it will work?
Because with the current prerelease build and the report you send me, it's not working, the values defined as Decimal(nullable) (Flesh firmness for example) are not even displayed, as you can see on this screenshot:
Sans titre.png
Sans titre.png (9.33 KiB) Viewed 1398 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to avoid null values turned to 0?

Post by HighAley »

Hello.

Please, check this report template with our next prerelease build.
It will be available on January 17.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: How to avoid null values turned to 0?

Post by Jennypi »

Hello,

I've installed the prerelease build 2014.01.17.
Indeed it is working fine now, thank you.

One question, still: in your report_modified example, you defined the aggregate function like this:

Code: Select all

{Avg(GroupHeaderBand2,mydata.field)} 
when I do the same in my SQL based report, it's not working. I have to use

Code: Select all

{Avg(DataBand2,mydata.field)}
Can you explain me why?

Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to avoid null values turned to 0?

Post by HighAley »

Hello.

To answer this question w need to see where and how do you use this expression.
Anyway it's good that you have solved your issue.

Thank you.
Post Reply