Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 246119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:08:45+00:00 2026-05-11T21:08:45+00:00

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

  • 0

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

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:08:45+00:00Added an answer on May 11, 2026 at 9:08 pm

    Yes, Crystal can easily handle an xml datasource. However, you have to realize that the data will be represented as a table. Just set the datasource to the xml doc and put all the fields in the details section to see what I mean. I’d guess there’d be a LogEntry, Parameter, and Parameters tables.

    To concat the parameters into one line you can use a shared stringvar like so…

    Group By the LogEntry_Id field then create these 3 formula objects…

    reset_var

    shared stringvar params;
    
    whileprintingrecords;
    
    params := '';
    

    concat_var

    shared stringvar params;
    
    whileprintingrecords;
    
    params := params + iif(length(params) = 0, "", " ") + {Parameter.Value};
    

    show_var

    shared stringvar params;
    
    whileprintingrecords;
    
    params;
    

    Drag reset_var to the group header (suppress the group header). This will reset the var on each LogEntry. Drag concat_var to the details section(suppress the details section). This will build the param string. Then drag show_var to the group footer to display the params.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following elements in my schema: <xs:schema attributeFormDefault=unqualified elementFormDefault=qualified xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:complexType name=optimizeModelBase>
I have following xml: <xs:schema attributeFormDefault=unqualified elementFormDefault=qualified xmlns=http://www.testuri.org targetNamespace=http://www.testuri.org xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element name=Price> <xs:complexType> <xs:sequence>
I have a xsd file that looks like this: <xs:schema attributeFormDefault=unqualified elementFormDefault=qualified xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element
I have this XML <?xml version=1.0 encoding=utf-8?> <root> <xsd:schema id=root xmlns= xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:msdata=urn:schemas-microsoft-com:xml-msdata> <xsd:import
I have this schema: <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:simpleType name=errorType> <xs:restriction base=xs:decimal> <xs:totalDigits
i have this xml schema <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns=http://hidden/abc xmlns:xs=http://www.w3.org/2001/XMLSchema targetNamespace=http://hidden/abc elementFormDefault=qualified attributeFormDefault=unqualified
I have following XML schema: <?xml version=1.0 encoding=UTF-8 standalone=no?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element name=content type=contentType/>
I have a Xml-Schema file to validate xml-Files. Xml-Schema: <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema
I have a schema with following attributes in schema element: <schema xmlns=http://www.w3.org/2001/XMLSchema xmlns:abc=http://abc.example.com targetNamespace=http://abc.example.com
If I have a schema like this: <?xml version=1.0 encoding=utf-8?> <xs:schema targetNamespace=http://mysticwarlords.kaa/XMLSchema xmlns=http://mysticwarlords.kaa/XMLSchema xmlns:xs=http://www.w3.org/2001/XMLSchema>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.