Text Box Interpreting String As Integer

Stimulsoft Reports.JS discussion
Post Reply
ericp
Posts: 51
Joined: Mon Aug 21, 2023 9:22 pm

Text Box Interpreting String As Integer

Post by ericp »

I'm running into this weird issue where my strings are being automatically interpreted as an integer. You can see that my JSON has the value of "600230E32", but Stimulsoft is displaying "600E+37" I have the textbox set to general and ensured that it is a string, but it keeps showing up as "600E+37"

I attached the mrt file as well
Attachments
SRTCExport.mrt
(183.77 KiB) Downloaded 281 times
Screen Shot 2024-06-24 at 1.59.29 PM.png
Screen Shot 2024-06-24 at 1.59.29 PM.png (755.73 KiB) Viewed 2860 times
Screen Shot 2024-06-24 at 1.59.00 PM.png
Screen Shot 2024-06-24 at 1.59.00 PM.png (1.3 MiB) Viewed 2860 times
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Text Box Interpreting String As Integer

Post by Lech Kulikowski »

Hello,

In JS version for JSON data, the type is determined by the first value encountered, in this case, the first value is numeric, so it tries to cast to a numeric value.

You can use the option - StiOptions.Dictionary.Json.ParseTypeAsString

Thank you.
ericp
Posts: 51
Joined: Mon Aug 21, 2023 9:22 pm

Re: Text Box Interpreting String As Integer

Post by ericp »

Hey Lech, I can't seem to find the option anywhere on Designer.

Could you referring to wrapping the value in that expression? I've tried this {StiOptions.Dictionary.Json.ParseTypeAsString(Projects_CurrentProjectRevision_FundMatchDetails.Projects_CurrentProjectRevision.WSDOTID)}, but it's just displaying a blank. Please advise, thanks!
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Text Box Interpreting String As Integer

Post by Lech Kulikowski »

Hello,

You should set this option from the code, not in the designer.

Thank you.
Post Reply