Page 1 of 1

XML problem

Posted: Wed Dec 06, 2017 7:59 pm
by Guilherme.Camilo
I was trying to export a report to xml but the DATATABLE class was converted with the name “table1” instead of their true name.
XML result
XML result
sample.png (24.59 KiB) Viewed 4462 times
Error location
Error location
code.png (163.25 KiB) Viewed 4462 times

Re: XML problem

Posted: Wed Dec 06, 2017 8:32 pm
by HighAley
Hello.

Sorry, maybe we don't understand you right.
Could you describe your scenario more detailed?

Thank you.

Re: XML problem

Posted: Thu Dec 07, 2017 3:01 pm
by RodrigoGT
Hello,

I have the same problem.

if I try to export a report as xml, the name of the node elements is not being assigned correctly.
I created a example on GitHub to illustrate the problem.
https://github.com/RodrigoGT/StimulsoftSample

the sample shows two xml, the first xml is what I expected to be generated by the report
and second xml was generated by the report.

if you look into the xml generated by the report, you'll notice that the element name appears as "Table1" but it supposed to look like "Category".

how do I set the element name correctly?

Re: XML problem

Posted: Mon Dec 11, 2017 2:38 pm
by HighAley
Hello, Fabiano.

We have added a new export setting:
StiXmlExportSettings.TableName

It will be available in the 2018.1.4 build.
You could set this option and get necessary result.

Thank you.

Re: XML problem

Posted: Tue Dec 19, 2017 4:03 pm
by RodrigoGT
Hello,

the problem was not fixed.

the export settings are not being passed on "StiReport.Export.cs" to "StiXmlExportService", on method "public void ExportDocument(StiExportFormat exportFormat, StiExportService exportService, Stream stream, StiExportSettings settings)"
Original Code
Original Code
original code.png (39.38 KiB) Viewed 4414 times
a possible solution is
Proposed Fix
Proposed Fix
proposal.png (40.62 KiB) Viewed 4414 times

Re: XML problem

Posted: Fri Dec 22, 2017 3:22 pm
by HighAley
Hello.

Yes, there was an issue with ExportDocument() method.
We are fixing this issue right now.
You should set the TableName of the StiXmlExportSettigns and use the ExportXML() method.

Thank you.

Re: XML problem

Posted: Wed Jan 17, 2018 12:54 pm
by RodrigoGT
Hello,

An error was introduced in update 2018.1.5, an argument exception "An DataType property of the StiXmlExportSettings class can't be changed!" was thrown when I created a new instace of StiXmlExportSettings.
Error
Error
StimulsoftSample (Debugging) - Microsoft Visual Studio 2018-01-17 10.48.28.png (60.95 KiB) Viewed 4343 times

Re: XML problem

Posted: Thu Jan 18, 2018 3:44 am
by Edward
Hi Rodrigo,

Thank you for the sample project that reproduces the issue. The problem has been confirmed, we will let you know in this topic once it is fixed.

Thank you,
Edward
5629

Re: XML problem

Posted: Thu Jan 18, 2018 9:48 am
by Edward
Hi Rodrigo,

The issue has been fixed and the next build will have the fix included.
In the meantime, could you please use the following code, that will create a similar object of settings:

Code: Select all

var settings = new StiDataExportSettings(StiDataType.Xml);
Thank you,
Edward