Hello,
I'm currently working on upgrading from Stimulsoft version 2020.5.1 to 2024.3.4. We use JSON data for our reports, but there seems to have been a change made to the StiJsonToDataSetConverterV2 static class that is causing it to add rows to tables in the data set that should not be there. The values in the rows are all null, but the result is that our reports now render incorrectly. There are blank rows where there should be none. I've made a simple report and JSON file to illustrate this which I have attached to this post. Here's a quick breakdown of the issue:
This is the layout of the simple report:
You can see that there is a parent and child relationship between the two data bands as defined in the data source on the right. I have the "Print if Detail Empty" option enabled on the master row component. This is how it looks when previewed in 2020.5.1:
This looks correct, with the proper amount of space between the bands. Lastly, if I use the "View Data" function in the designer for the child table, I see this:
There are only rows for the 1st and 3rd parent rows (relation_id 0 and 2) as expected since parents 2 and 4 have no children in the JSON.
Now, lets take a look at the preview in 2024.3.4:
I've added some arrows to make the issue clear. There is empty space where there should be none. If we use the "View Data" function we can see the issue:
Again, I've added arrows for clarity. There are now child rows for all parent values, not just the ones that actually have a value. There should only be rows with relation_id 0 and 2 and none for 1 or 3. The report engine is of course seeing these fake rows and rendering them.
Is there a way to stop the converter from adding these fake rows? If there is a property I can set somewhere to stop these from being added that would be ideal.
Thanks,
Ryan Robar
StiJsonToDataSetConverterV2 adding erroneous empty rows to DataSet after upgrade.
-
- Posts: 30
- Joined: Fri Sep 20, 2019 3:46 pm
- Location: Canada
StiJsonToDataSetConverterV2 adding erroneous empty rows to DataSet after upgrade.
- Attachments
-
- JSONConverterTest.mrt
- Simple Example Report
- (10.61 KiB) Downloaded 218 times
-
- JSONConverterTest.json
- Simple Example JSON
- (716 Bytes) Downloaded 194 times
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiJsonToDataSetConverterV2 adding erroneous empty rows to DataSet after upgrade.
Hello,
We need time to investigate the issue. We will let you know about the result.
At the current moment, you can remove empty collections from JSON string for the old behavior.
Thank you.
#15348
We need time to investigate the issue. We will let you know about the result.
At the current moment, you can remove empty collections from JSON string for the old behavior.
Thank you.
#15348
- Attachments
-
- 1.png (167.83 KiB) Viewed 2571 times
-
- Posts: 30
- Joined: Fri Sep 20, 2019 3:46 pm
- Location: Canada
Re: StiJsonToDataSetConverterV2 adding erroneous empty rows to DataSet after upgrade.
Hello,
I was able to use your proposed workaround, but it required writing code to prevent the empty collections from being serialized when making any JSON that will be used by Stimulsoft. This will work for now, but I would prefer if the converter could handle this the way it used to, or at least if it could be told to conditionally.
Thanks
I was able to use your proposed workaround, but it required writing code to prevent the empty collections from being serialized when making any JSON that will be used by Stimulsoft. This will work for now, but I would prefer if the converter could handle this the way it used to, or at least if it could be told to conditionally.
Thanks
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiJsonToDataSetConverterV2 adding erroneous empty rows to DataSet after upgrade.
Hello,
Yes, we are working on this issue, and this suggestion was provided as a temporary workaround.
Thank you.
Yes, we are working on this issue, and this suggestion was provided as a temporary workaround.
Thank you.
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: StiJsonToDataSetConverterV2 adding erroneous empty rows to DataSet after upgrade.
Hello,
The issue is fixed. The fix will be available in one of the next release builds.
Thank you.
The issue is fixed. The fix will be available in one of the next release builds.
Thank you.