How to fix field type .JSON?

Stimulsoft Ultimate discussion
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

How to fix field type .JSON?

Post by dikan »

I have a report with .JSON as a data source. It works ok but every time I open report I have to change field definition because when report is loaded in report designer it also loads .json file where is date field is defined as
"2023/05/06T00:00:00" and the report designer resolved this as a string. After I change it to datetime (nullable) and during this session it works well and then when I save the report and tomorrow load it again it is string type as it was in the first place.

How can I fix the field definition to the selected field type?

Regards,

dikan
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to fix field type .JSON?

Post by Lech Kulikowski »

Hello,

Please clarify which product, version, and designer are you use?

How do you load report, data, and start the designer?

Thank you.
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: How to fix field type .JSON?

Post by dikan »

A picture is worth a thousand words
First to data in array looks like this and bold fields are problematic fields:
{
"TIP" : "PRAKTIČNA PROVERA OSPOSOBLJENOSTI",
"OPIS" : "235 OB6",
"RADID" : 1002911,
"IMEPREZIME" : "Martino Oran",
"DATUMPROVP" : "0000-00-00T00:00:00",
"SLDATP" : "0000-00-00T00:00:00",

"OSRID" : 235,
"RDMID" : 0,
"ODSUTAN" : 0
},
{
"TIP" : "PRAKTIČNA PROVERA OSPOSOBLJENOSTI",
"OPIS" : "133 OB6",
"RADID" : 1005064,
"IMEPREZIME" : "Vukosav Selan",
"DATUMPROVP" : "2019-07-18T00:00:00",
"SLDATP" : "2020-07-18T00:00:00",

"OSRID" : 133,
"RDMID" : 0,
"ODSUTAN" : 0
}

Regards,

dikan
Attachments
StimulAbout.png
StimulAbout.png (15.25 KiB) Viewed 5714 times
DataLoad.png
DataLoad.png (22.5 KiB) Viewed 5714 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to fix field type .JSON?

Post by Lech Kulikowski »

Hello,

How do you load report, data, and start the designer?

Thank you.
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: How to fix field type .JSON?

Post by dikan »

I am not loading at all. Designer by default finds the .JSON file on the designated path.

Regards,

dikan
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: How to fix field type .JSON?

Post by dikan »

I am not loading at all. Designer by default finds the .JSON file on the designated path.

regards,

dikan
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to fix field type .JSON?

Post by Lech Kulikowski »

Hello,

How do you run the designer? Is it a standalone designer.exe, or call Design() method from your code, etc?

Thank you.
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: How to fix field type .JSON?

Post by dikan »

I am using standaone designer.

Regards,

dikan
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: How to fix field type .JSON?

Post by Lech Kulikowski »

Hello,

Please try to check the last release version 2023.2.3 and let us know about the result.

Thank you.
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: How to fix field type .JSON?

Post by dikan »

Last release solved the problem.

Thank you,

dikan
Post Reply