Page 1 of 1

Xml with XSD Data source problem

Posted: Tue Jan 30, 2018 11:26 am
by Larusso
Hi, I have couple of questions.
I'm trying to use XSD data source.
1) How can I create relations between nodes automatically? Right now this data source consists of seperate "tables"
2) How can I get to nodes children? I have a multiple occurrence node that has two child nodes (occurrence 0..1). I need to show in one row data from parent node and from both child nodes
Here is a part of xsd structure:

<xs:element name="RepeatabilityReading">
<xs:complexType>
<xs:all>
<xs:element ref="TestPoint"/>
<xs:element ref="RepeatabilityAsFound" minOccurs="0"/>
<xs:element ref="RepeatabilityAsLeft" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="RepeatabilityAsFound" type="RepeatabilityReadingPoint"/>
<xs:complexType name="RepeatabilityReadingPoint">
<xs:all>
<xs:element ref="Value"/>
<xs:element ref="PointId"/>
<xs:element ref="NotPerformed"/>
<xs:element ref="ReplacedByPoint"/>
<xs:element ref="Additive" minOccurs="0"/>
<xs:element ref="ValueOfLoad" minOccurs="0"/>
<xs:element ref ="IsEuramet" />
<xs:element ref="OutsideEurametRange" />
<xs:element ref="InitialVerificationResult" minOccurs="0"/>
<xs:element ref="InServiceResult" minOccurs="0"/>
</xs:all>
</xs:complexType>

Re: Xml with XSD Data source problem

Posted: Thu Feb 01, 2018 12:55 am
by Alex K.
Hello,

You can add following attributes in the XSD file:

Code: Select all

    <xs:keyref name="CategoriesProducts" refer="Constraint1">
      <xs:selector xpath=".//Products" />
      <xs:field xpath="CategoryID" />
    </xs:keyref>
Pleases check the Demo.xsd in the attachment.

Thank you.

Re: Xml with XSD Data source problem

Posted: Thu Feb 01, 2018 7:14 am
by Larusso
Hi, Thanks for the reply.
I don't think Your example deals with this case. In You xsd Customers and Orders have explicit key to connect with and they are independent nodes. In my example RepeatabilityAsFound and RepeatabilityAsLeft are children of RepeatabilityReading and there is no explicit key to connect one to another. This xsd can't be modified.

Thanks

Re: Xml with XSD Data source problem

Posted: Thu Feb 01, 2018 10:50 am
by Alex K.
Hello,

Please check the following article:
https://www.w3schools.com/xml/schema_complex.asp

Thank you.

Re: Xml with XSD Data source problem

Posted: Thu Feb 01, 2018 12:00 pm
by Larusso
Hello,
Not helpful at all, read it, know it, not related to my problem and also I already wrote I'm not allowed to change xsd on which report must be based.
Thank You

Re: Xml with XSD Data source problem

Posted: Thu Feb 01, 2018 1:01 pm
by Alex K.
Hello,

In this case, you can try to manually add relations between data sources in the designer.

Thank you.

Re: Xml with XSD Data source problem

Posted: Fri Feb 02, 2018 7:19 am
by Larusso
Thanks, I knew I could add relation to parent, so from child could get to parent, but in this case I had to have relation to child. I already managed to do that by simply creating a reverse relation and it works but has its limitations. For now it is sufficient
Thanks

Re: Xml with XSD Data source problem

Posted: Fri Feb 02, 2018 9:05 am
by Alex K.
Hello

Ok
Please let us know if you need any additional help.

Thank you.