LINQ Reporting engine changes the number to date using NET

Hi,

My version is 20.7
Currently every small string number is converting into Date time.

My JSON is simple:
{'Min': '2.12', 'Max': '13.32'}

My word document:
Min: <<[Min]>>
Max:<<[Max]>>

Result is
Min: 2/12/2020 12:00:00 AM
Max:13.32

I tried “#.##” and “0.00”, both are not working.
Maybe there is a proper way to do it?

Regards,
Zhenyu

@zhenyu.wang

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-20813 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Tahir,

Thank you for quick reply.
Looking forward for the issued resolved later.

By the way, do you know what is the proper way to format decimal in Aspose Word?
for example, ‘Min’: ‘2.123’
How to show two decimal places in Word?

I tried “#.##” and “0.00”, both are not working.
Min: <<[Min]:”#.##”>>
Min: <<[Min]:”0.00”>>

Regards,
Zhenyu

oh, I know what was the issue.
in the JSON, if I use the decimal, not string, the “#.##” and “0.00” will work.

‘Min’: ‘2.123’ changes to ‘Min’: 2.123

@zhenyu.wang

Yes, your understanding is correct. Please let us know if you face any issue while using Aspose.Words.

@zhenyu.wang

It is to inform you that we have closed this issue (WORDSNET-16325) as ‘Not a Bug’.

By default, the engine tries to parse date-time values from as many strings as it can. However, the you can change this behavior by specifying a concrete format to parse date-time values or skip date-time parsing from strings at all. Please check remarks of JsonDataLoadOptions.ExactDateTimeParseFormat property for more information.

A post was split to a new topic: LINQ Reporting Engine number format