I have an XML that my company sends out daily it used to be created by SQL but I now have to use crystal reports and I can't seem to get it to line up the same. Please help with any references or how to rewrite my schema. I will try to provide pictures of what currently have.
(This is Mine from Crystal Reports)
(This is how I need it to be)
MY SCHEMA
Original Schema
I apologize for the length this is my first time use.
(This is Mine from Crystal Reports)
Code:
[B]<?xml version="1.0" encoding="UTF-8" ?>
- <BSASStockStatus xmlns="urn:crystal-reports:schemas" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="urn:crystal-reports:schemas Stock_Status_Columns788.xsd">
- <ReportArea Level="0" Type="Report" ReportDate="">
- <Items Type="Header">
<Text>7/18/2007</Text>
</Items>
- <Item Level="1" Type="Details">
<strPartNumber FieldName="{STOCK.PARTNUMBER}">004-351-0</strPartNumber>
<strNomenclature FieldName="{STOCK.DESCRIPTN}">TIRE</strNomenclature>
<strQuantity FieldName="{STOCK.QTY_INSTOCK}">1.00</strQuantity>
<strSafetyLevel FieldName="{STOCK.MINQTYLEVEL}">0.00</strSafetyLevel>
<strASL FieldName="{STOCK.MAXQTYLEVEL}">1.00</strASL>
Code:
<?xml version="1.0" ?> - <BSASStock:StockStatus xmlns:BSASStock="http://www.w3.org/2001/XMLSchema-instance" reportDate="2007-06-01" BSASStock:schemaLocation="BSAS-Stock.xsd"> - <Items> - <item strPartNumber="01-P24481F001"> <strNomenclature>"POWER CONTROL PTRA200"</strNomenclature> <strQuantity>"4"</strQuantity> <strSafetyLevel>"3"</strSafetyLevel> <strASL>"6"</strASL> </item> - <item strPartNumber="01-P25390B002"> <strNomenclature>"SATCOM REMOTE CONTROL"</strNomenclature> <strQuantity>"3"</strQuantity> <strSafetyLevel>"7"</strSafetyLevel> <strASL>"13"</strASL> </item>
Code:
<?xml version="1.0" encoding="UTF-8" ?> - <xsd:schema xmlns="urn:crystal-reports:schemas" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" targetNamespace="urn:crystal-reports:schemas" elementFormDefault="qualified"> - <xsd:attributeGroup name="FieldAttributes"> <xsd:attribute name="FieldName" type="xsd:string" /> </xsd:attributeGroup> - <xsd:complexType name="DecimalFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="FloatFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:float"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="StringFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="DateFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:date"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="TimeFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:time"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="DateTimeFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:timeInstant"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="BoolFieldBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:boolean"> <xsd:attributeGroup ref="FieldAttributes" /> <xsd:anyAttribute namespace="##any" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="PictureBaseType"> <xsd:attribute name="gtype" type="xsd:string" /> <xsd:attribute name="src" type="xsd:string" /> <xsd:anyAttribute namespace="##any" /> </xsd:complexType> - <xsd:complexType name="RowTotalBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> <xsd:attribute name="RowNumber" type="xsd:integer" use="required" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="ColumnTotalBaseType"> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> <xsd:attribute name="ColumnNumber" type="xsd:integer" use="required" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> - <xsd:complexType name="BSASStockStatusType"> - <xsd:sequence> <xsd:element name="ReportArea" type="ReportAreaType" /> </xsd:sequence> </xsd:complexType> - <xsd:complexType name="ItemType"> - <xsd:sequence> <xsd:element name="strPartNumber" type="StringFieldBaseType" /> <xsd:element name="strNomenclature" type="StringFieldBaseType" /> <xsd:element name="strQuantity" type="FloatFieldBaseType" /> <xsd:element name="strSafetyLevel" type="FloatFieldBaseType" /> <xsd:element name="strASL" type="FloatFieldBaseType" /> </xsd:sequence> <xsd:attribute name="Level" type="xsd:integer" use="required" /> <xsd:attribute name="Type" type="xsd:string" use="required" /> </xsd:complexType> - <xsd:complexType name="ItemsType"> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:sequence> <xsd:element name="Text" type="xsd:string" /> </xsd:sequence> </xsd:choice> <xsd:attribute name="Type" type="xsd:string" use="required" /> </xsd:complexType> - <xsd:complexType name="ReportAreaType"> - <xsd:sequence> <xsd:element name="Items" type="ItemsType" /> - <xsd:sequence minOccurs="1" maxOccurs="unbounded"> <xsd:element name="Item" type="ItemType" /> </xsd:sequence> <xsd:element name="Items" type="ItemsType" /> </xsd:sequence> <xsd:attribute name="Level" type="xsd:integer" use="required" /> <xsd:attribute name="Type" type="xsd:string" use="required" /> <xsd:attribute name="ReportDate" type="xsd:date" use="default" value="" /> </xsd:complexType> <xsd:element name="BSASStockStatus" type="BSASStockStatusType" /> </xsd:schema>
Code:
<?xml version="1.0" encoding="UTF-8" ?> - <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:BSASStock="http://www.BSAS.com" targetNamespace="http://www.BSAS.com" elementFormDefault="unqualified" attributeFormDefault="unqualified"> - <annotation> <documentation>Created as a test specification for sending of BSAS Stock Data to Army Copyright 2007 (c) BSAS - All rights reserved.</documentation> </annotation> <element name="StockStatus" type="BSASStock:StockStatusType" /> - <complexType name="StockStatusType"> - <sequence> <element name="Items" type="BSASStock:ItemsType" /> </sequence> <attribute name="reportDate" type="date" /> </complexType> - <complexType name="ItemsType"> - <sequence> - <element name="item" minOccurs="0" maxOccurs="unbounded"> - <complexType> - <sequence> <element name="strNomenclature" type="string" /> <element name="strQuantity" type="string" /> <element name="strSafetyLevel" type="string" /> <element name="strASL" type="string" /> <element name="strVendor" type="string" /> </sequence> <attribute name="strPartNumber" type="string" /> </complexType> </element> </sequence> </complexType> </schema>
Comment