Xml file: "table" name

Stimulsoft Reports.NET discussion
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Xml file: "table" name

Post 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!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Xml file: "table" name

Post 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.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Xml file: "table" name

Post 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 3628 times
What do you think?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Xml file: "table" name

Post 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.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Xml file: "table" name

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Xml file: "table" name

Post by HighAley »

Hello.

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

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Xml file: "table" name

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Xml file: "table" name

Post by HighAley »

Hello.

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

StiOptions.Export.Xml.ConvertTagsToUpperCase

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: Xml file: "table" name

Post 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;
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Xml file: "table" name

Post by HighAley »

Hello.

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

Thank you.
Post Reply