NaN when number comes null

Stimulsoft Reports.JS discussion
Post Reply
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

NaN when number comes null

Post by csrt »

Hello. I am using Stimulsoft.Reports.JS Version: 2019.4.1, and having the next problem:
when instead of a number comes null - the Report viewer displays NaN.

I have to mention that before I was using Version: 2019.1.1, Build date: 2018.12.17 - and there was no such problem. Even now, in the same report, when switching between versions - the newer version displays NaN, and the older - doesn't.
Attachments
nan.png
nan.png (147.53 KiB) Viewed 2996 times
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Re: NaN when number comes null

Post by csrt »

Hello. I've upgraded to version 2019.4.2 - and the problem still persists. Could you suggest a solution, so I can apply it locally on my scripts? Or is there a more general way to avoid such behavior? Thank you
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Re: NaN when number comes null

Post by csrt »

Hello. Could you suggest any ideas regarding the described problem? Thank you in advance.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: NaN when number comes null

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Re: NaN when number comes null

Post by csrt »

Hello, I'm attaching a report from demo. Please check out the field "Ship Via" - I modified it, so it would be type "decimal". If it has a number value - all works just fine. But if it has "null" value - the report displays NaN. In this same situation, older version of the library(Version: 2019.1.1), in this same situation, just did not displayed nothing. Any ideas how to fix it?
Attachments
Report (1).mrt
(136.6 KiB) Downloaded 127 times
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Re: NaN when number comes null

Post by csrt »

I've attached another report that displays the same problem
Attachments
simple.mrt
(14.88 KiB) Downloaded 135 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: NaN when number comes null

Post by Lech Kulikowski »

Hello,

Thank you for the sample.
We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#1363
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: NaN when number comes null

Post by Lech Kulikowski »

Hello,

The issue is fixed. The fix will be available in the next release build within several days.

Thank you.
alex.coles
Posts: 14
Joined: Mon Feb 03, 2020 2:19 pm

Re: NaN when number comes null

Post by alex.coles »

Alternatively use:

Code: Select all

{IIF(int.Parse(source.param), source.param, "-")}
Stimulsoft.Reports.JS - Version: 2019.4.2 - Build date: 2019.11.13
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: NaN when number comes null

Post by Andrew »

Hello,

Thank you for sharing your workaround.
Have a nice day!
Post Reply