Page 1 of 2

Xml file: "table" name

Posted: Mon Jun 20, 2016 10:10 am
by Jennypi
Hi,

I need to generate xml files starting with:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<dataroot>
 <R_semis_PATHO>
...
Instead, Stimulsoft generates this:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Report>
 <Table1>
...
2 questions:
- is it possible to change <Report> to <dataroot>? If yes, how?
- I found the tag property to change the data field names in between < >, but how can I change the "table" name?
The export shows "Table1" instead of <R_semis_PATHO>, which a field from my query (the same for all records).

Thanks!

Re: Xml file: "table" name

Posted: Tue Jun 21, 2016 6:48 am
by HighAley
Hello.

You could change the Report by setting the Report Alias.
Unfortunately, it's impossible to change the Table1 to any other name.

If you need this, please, write a request to support@stimulsoft.com.

Thank you.

Re: Xml file: "table" name

Posted: Tue Jun 21, 2016 9:40 am
by Jennypi
Hi,

Using the alias for the report name is not working in my case, as I need it to be filled out dynamically, according to my query result.
I tried by setting the alias with "{Input_File.Test_Number}" but it's not retrieving the data from the query.

Maybe another solution is to generate the xml "manually" in the report, and to export as txt and then modify the extension to xml? Can't I modify the txt extension directly in the saving dialog?
It would give something like this:
Sans titre.png
Sans titre.png (130.23 KiB) Viewed 3619 times
What do you think?

Re: Xml file: "table" name

Posted: Wed Jun 22, 2016 7:42 am
by HighAley
Hello.

You could set the Report Alias in any event of the report. For instance, Before Print event of the Page.
You could add an option to change the extension when you export to plain text. Please, send us another request to support@stimulsoft.com.

Thank you.

Re: Xml file: "table" name

Posted: Wed Jun 22, 2016 7:50 am
by Jennypi
Requests sent!
Let me know when it can be done.
In the meantime, we will manage by changing the file extension once it's saved.

Thanks you.

Re: Xml file: "table" name

Posted: Thu Jun 23, 2016 6:09 am
by HighAley
Hello.

We will right you by email when we get any result.

Thank you.

Re: Xml file: "table" name

Posted: Thu Jun 23, 2016 6:55 am
by Jennypi
Hi,

Quick update about my requests, as I got news from our robot equipment provider:
- it is not needed anymore to be able to customize the first XML tags of the file (<report alias> and <table1>). The current ones are OK.
- but currently, all tags are converted to upper case when exporting the xml data files. This is a problem for the equipment we are going to use, which software is case sensitive.

Is there something we can do for this?
Should I create another request and cancel the 1st one?

Thank you.

Re: Xml file: "table" name

Posted: Fri Jun 24, 2016 6:33 am
by HighAley
Hello.

We have added a static option, that you should set to false

StiOptions.Export.Xml.ConvertTagsToUpperCase

Thank you.

Re: Xml file: "table" name

Posted: Fri Jun 24, 2016 7:01 am
by Jennypi
Great!
Should I upgrade to the latest prerelease build to have this property?
I tried to add it to the code but it raises an error that the property does not exists:

Code: Select all

namespace Reports
{
    public class Report : Stimulsoft.Report.StiReport
    {
        public Report()        {
            this.InitializeComponent();
			StiOptions.Export.Xml.ConvertTagsToUpperCase;

Re: Xml file: "table" name

Posted: Fri Jun 24, 2016 3:00 pm
by HighAley
Hello.

Yes, this property will be available in our next prerelease build.
It's already available on our site.

Thank you.