We have this XML schema:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Log">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="LogEntry" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Time" type="xs:dateTime" />
<xs:element name="StringRef" type="xs:string" />
<xs:element name="Parameters" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Value" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
and we want to create a Crysal Report that looks like this:
<Time> <Parameter:Name == Text> <Parameter:Name == Param1> <Parameter:Name == Param2>
where each line of the report is one LogEntry. The LogEntry's that are displayed are filitered on the StringRef parameter. So, given the following XML:
<Log>
<LogEntry>
<Time>2009-06-15T11:55:04</Time>
<StringRef>Type1</StringRef>
<Parameters>
<Parameter>
<Name>Text</Name>
<Value>Message1</Value>
</Parameter>
<Parameter>
<Name>Param1</Name>
<Value>1</Value>
</Parameter>
<Parameter>
<Name>Param2</Name>
<Value>2</Value>
</Parameter>
</Parameters>
</LogEntry>
<LogEntry>
<Time>2009-06-15T11:55:05</Time>
<StringRef>Type2</StringRef>
<Parameters>
<Parameter>
<Name>Text</Name>
<Value>Message2</Value>
</Parameter>
<Parameter>
<Name>Param1</Name>
<Value>1</Value>
</Parameter>
<Parameter>
<Name>Param2</Name>
<Value>2</Value>
</Parameter>
</Parameters>
</LogEntry>
<LogEntry>
<Time>2009-06-15T11:55:06</Time>
<StringRef>Type3</StringRef>
<Parameters>
<Parameter>
<Name>Text</Name>
<Value>Message3</Value>
</Parameter>
<Parameter>
<Name>Param1</Name>
<Value>1</Value>
</Parameter>
<Parameter>
<Name>Param2</Name>
<Value>2</Value>
</Parameter>
</Parameters>
</LogEntry>
</Log>
and filtering on:
StringRef == Type1 or StringRef == Type3
would give a report like this:
2009-06-15T11:55:04 Message1 1 2
2009-06-15T11:55:06 Message3 1 2
My question is this: can this be done using Crystal Reports? If it can, some information on how to do it would be helpful.
Notes - the above has been anonymised somewhat so I'm looking for how to do it rather than a specific answer, although that will be useful as an example. We've been told by the person responsible for implementing this report that the above is not possible, however, I feel that this should be possible. It's OK to say it's impossible, it's just means more work for me :-(
Cheers,
Skizz