cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Neena Frequent Visitor
Frequent Visitor

XML Import Mobile Report Publisher Error

hi,

 

I have a xml based dataaset that i want to use for mobile report. I could import the xml dataset in Mobile report Publisher but it doesn't show the correct data type. In xsd i have defined the field 'Salary' as Integer but in Mobile report publisher it is imported as Filter Field. Is it possible to change the data type direct in Mobile Report Publisher?

 

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="data-set">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="record">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Workgroup" type="xs:string" />
              <xs:element name="Salary" type="xs:integer" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

 

Thanks

Neena

2 REPLIES 2
Moderator v-qiuyu-msft
Moderator

Re: XML Import Mobile Report Publisher Error

Hi @Neena,

 

It's not supported to change data type for data columns in SQL mobile report publisher. 

 

Based on my test, the dataset created from query below: 

 

<Query>
<XmlData>
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="data-set">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="record">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Workgroup" type="xs:string" />
              <xs:element name="Salary" type="xs:integer" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
</XmlData>
</Query>

s1.PNG

 

I didn't see the field 'Salary' as Integer. Did you use above query in shared dataset actually? What do you mean about "In xsd i have defined the field 'Salary' as Integer but in Mobile report publisher it is imported as Filter Field. "? 

 

Best Regards,
Qiuyun Yu 

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Neena Frequent Visitor
Frequent Visitor

Re: XML Import Mobile Report Publisher Error

Hi Qiuyun Yu,

 

Thanks for our response.

I have used the following xml file as a shared dataset.

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data-set>
            <record>
                        <Workgroup>A</Workgroup>
                        <Salary>1000</Salary>
            </record>
            <record>
                        <Workgroup>B</Workgroup>
                        <Salary>2000</Salary>
            </record>
            <record>
                        <Workgroup>C</Workgroup>
                        <Salary>3000</Salary>
            </record>
            <record>
                        <Workgroup>D</Workgroup>
                        <Salary>4000</Salary>
            </record>
            <record>
                        <Workgroup>E</Workgroup>
                        <Salary>5000</Salary>
            </record>
            <record>
                        <Workgroup>F</Workgroup>
                        <Salary>6000</Salary>
            </record>
            <record>
                        <Workgroup>G</Workgroup>
                        <Salary>7000</Salary>
            </record>
</data-set>

image 1.png

I have imported the dataset into Mobile report publisher. As you see Salary can’t be used for calculation.

 

Image 2.pngImage 3.png

 

I hope this makes sense.

 

Thanks for your support.

 

Best Regards,

Neena

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 273 members 2,633 guests
Please welcome our newest community members: