Free Support Forum - aspose.com

LINQ Reporting Engine - Nullable int is not recognized for JsonDataSource using .NET

Hello,

I have come across a bug with the JsonDataSource generator where a nullable int is being turned into a string.

As per the documentation on the JsonDataSource it should accept nullable ints : Documentation

If you switch the ReviewerQuestionOptionAnswerId in the json attached to all being int (i.e. none being null) then the attached program will run. However if you run it in its current state it will produce the following error:

Error! Can not apply operator ‘==’ to operands of type ‘System.Nullable`1[System.Int32]’ and 'System.String’

Which is incorrect as the type should be int.

I have tested this issue all the way back to 20.3 which all have the same bug as far as I can tell.

A patch would be greatly appreciated as this is blocking us.

Not working Version:
JsonDataSourceBugged.zip (20.5 KB)

Working Version:
JsonDataSourceFixed.zip (20.6 KB)

Edit:
Attached buggy document:
Buggy.zip (10.0 KB)

Also I have just noticed the same behavior with booleans

@nross

Could you please ZIP and attach “Buggy.docx” here for testing? We will investigate the issue and provide you more information on it.

Hi Sorry @tahir.manzoor I forgot to attach it my bad
Buggy.zip (10.0 KB)

@nross

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-20507 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor what do you think the timeline for fixing this bug will be?
Is there a work around I can implement?

@nross

We try our best to deal with every customer request in a timely fashion, we unfortunately cannot guarantee a delivery date to every customer issue. We work on issues on a first come, first served basis. We feel this is the fairest and most appropriate way to satisfy the needs of the majority of our customers.

Currently, your issue is under analysis phase. Once we complete the analysis of your issue, we will then be able to provide you an estimate.

@tahir.manzoor
Hi, I can see this issue is closed, is this going to be patched in the next release?

@nross

Yes, this issue has been resolved and its fix will be available in the next version of Aspose.Words i.e. 20.6.