Adding huge numbers as general text shows as numbers
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
Re: Adding huge numbers as general text shows as numbers
Sorry previous json data was wrong here is the files for assessment
- Attachments
-
- ridetest.json
- (215.15 KiB) Downloaded 140 times
-
- Ride.mrt
- (88.72 KiB) Downloaded 130 times
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
Re: Adding huge numbers as general text shows as numbers
If anybody reads this, until I get a response here, a workaround was to use Mid
{Mid(root.documento_numero_autorizacion,1,49)}
and had to add a non numeric character at the beginning of the string value from the json
worked for both the normal text and the barcode
{Mid(root.documento_numero_autorizacion,1,49)}
and had to add a non numeric character at the beginning of the string value from the json
worked for both the normal text and the barcode
Re: Adding huge numbers as general text shows as numbers
Hello.
Thank you for sharing the solution to the problem.
Thank you for sharing the solution to the problem.
-
- Posts: 25
- Joined: Fri Nov 10, 2017 9:48 pm
Re: Adding huge numbers as general text shows as numbers
Still needs to be checked tho shouldnt need to do workarounds
-
- Posts: 6254
- Joined: Tue Mar 20, 2018 5:34 am
Re: Adding huge numbers as general text shows as numbers
Hello,
We have added some improvements in the data parser. Will be available in the next release.
Thank you.
We have added some improvements in the data parser. Will be available in the next release.
Thank you.
-
- Posts: 1
- Joined: Tue Dec 06, 2016 10:51 am
Re: Adding huge numbers as general text shows as numbers
Hello,
If anyone reads this, we just had the same problem with version Stimulsoft.Reports.Engine 2020.2.2 and Stimulsoft.Reports.Engine.NetCore 2020.2.3.
We used a similar workaround as described by the opener. The problem lies actually within the Library in the class StiJsonToDataSetConverter.cs which is from your NuGet package.
There is a function "private static Type ParseString(string str)" which tries to evaluate the column-type from the value. So if you have "914829300005910214860" as a value, it will be converted into a "double" type which ends up as "9.148293000059102E+20" in the report.
So the problem is not in the .mrt file, it is in the NuGet library in our case. In my opinion, the column-type should not be evaluated from the value, but from the data type of the property.
If anyone reads this, we just had the same problem with version Stimulsoft.Reports.Engine 2020.2.2 and Stimulsoft.Reports.Engine.NetCore 2020.2.3.
We used a similar workaround as described by the opener. The problem lies actually within the Library in the class StiJsonToDataSetConverter.cs which is from your NuGet package.
There is a function "private static Type ParseString(string str)" which tries to evaluate the column-type from the value. So if you have "914829300005910214860" as a value, it will be converted into a "double" type which ends up as "9.148293000059102E+20" in the report.
So the problem is not in the .mrt file, it is in the NuGet library in our case. In my opinion, the column-type should not be evaluated from the value, but from the data type of the property.
-
- Posts: 6254
- Joined: Tue Mar 20, 2018 5:34 am
Re: Adding huge numbers as general text shows as numbers
Hello,
Please try to use StiJsonToDataSetConverterV2
Thank you.
Please try to use StiJsonToDataSetConverterV2
Thank you.