
crystal report created using xsd from an xml file
I am creating a
Crystal Report from an xml file using an xsd however i am
getting an error with some fields. It appears that any fields referenced
from xml tags that are not closed on the same line cause the unspecified
system.exception. I am trying to display the report on a web form.
oRpt = new nurseryTest();
Nurserydatatest nurserydata = new Nurserydatatest();
oRpt.SetDataSource (nurserydata);
CrystalReportViewer1.ReportSource = oRpt;
Here is my xml
<schools xmlns=" http://www.*-*-*.com/ ;>
<school name="test" id="1111111" board=""> <---
any of these fields cause errors
<schoolproperties>
<property key="s_awpuforcesweight" weight="3" />
<property key="s_totalsalarybill" weight="354143" />
<property key="s_awpupupilweight" weight="0" />
<property key="s_awputravweight" weight="10.8" />
<property key="s_awpuealweight" weight="3" />
<property key="s_fttravellers" weight="12" />
<property key="s_pttravellers" weight="12" />
<property key="s_totalpupils" weight="300" />
<property key="s_preception" weight="0" />
<property key="s_preception" weight="3" />
<property key="s_freemeals" weight="50" />
<property key="s_freemeals" weight="11" />
<property key="s_floorarea" weight="1458" />
<property key="s_ftaddlang" weight="3" />
<property key="s_ptaddlang" weight="4" />
<property key="s_keystage" weight="0" />
<property key="s_teachers" weight="11" />
<property key="s_forces" weight="15" />
<property key="s_p1to7" weight="245" />
</schoolproperties>
<schooldesc aggschooltype="ControlledIntegratedPrimary">
</schooldesc>
<formulae>
<formula factorname="specialunits">
<processcalculation>(0*2000)</processcalculation>
<calculationtotal>0</calculationtotal>
</formula>
<formula factorname="premises">
<processcalculation>((1458 * 9.6) + (0 * 61.4814531723146))+
(0)</processcalculation>
<calculationtotal>13996.8</calculationtotal>
</formula>
<formula factorname="tsn">
<processcalculation>(0.142 * (300 *0) * (50/300))*0(300*
0)*300(((0*(100*50)+0)*300)/100)*0</processcalculation>
<calculationtotal>0</calculationtotal>
</formula>
<formula factorname="ssp">
<processcalculation>(1/200(300-300)*(1.2*(354143/11)))</processcalculation>
<calculationtotal>0</calculationtotal>
</formula>
<formula factorname="tsp">
<processcalculation>(0)</processcalculation>
<calculationtotal>0</calculationtotal>
</formula>
<formula factorname="sports">
<processcalculation>(2610)</processcalculation>
<calculationtotal>2610</calculationtotal>
</formula>
<formula factorname="splitsites">
<processcalculation>(0)</processcalculation>
<calculationtotal>0</calculationtotal>
</formula>
<formula factorname="irishmedium">
<processcalculation>(0)</processcalculation>
<calculationtotal>0</calculationtotal>
</formula>
<formula factorname="pupil">
<processcalculation>(0 * NaN)</processcalculation>
<calculationtotal>NaN</calculationtotal>
</formula>
<formula factorname="travellers">
<processcalculation>(10.8 * NaN)</processcalculation>
<calculationtotal>NaN</calculationtotal>
</formula>
<formula factorname="englishadditional">
<processcalculation>(3 * NaN)</processcalculation>
<calculationtotal>NaN</calculationtotal>
</formula>
<formula factorname="servicepersonel">
<processcalculation>(3 * NaN)</processcalculation>
<calculationtotal>NaN</calculationtotal>
</formula>
</formulae>
</school>
</schools>
and my xsd
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Nurserydatatest"
targetNamespace=" http://www.*-*-*.com/ ;
elementFormDefault="qualified" attributeFormDefault="qualified"
xmlns=" http://www.*-*-*.com/ ;
xmlns:mstns=" http://www.*-*-*.com/ ;
xmlns:xs=" http://www.*-*-*.com/ ;
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Nurserydatatest" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="school">
<xs:complexType>
<xs:sequence>
<xs:element name="schoolproperties" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="key" form="unqualified" type="xs:string" />
<xs:attribute name="weight" form="unqualified" type="xs:string"
/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="schooldesc" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="aggschooltype" form="unqualified"
type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="formulae" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="formula" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="processcalculation" type="xs:string"
minOccurs="0" msdata:Ordinal="0" />
<xs:element name="calculationtotal" type="xs:string"
minOccurs="0" msdata:Ordinal="1" />
</xs:sequence>
<xs:attribute name="factorname" form="unqualified"
type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" form="unqualified" type="xs:string" />
<xs:attribute name="id" form="unqualified" type="xs:string" />
<xs:attribute name="board" form="unqualified" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Any help would be greatly appreciated.
Simon