Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parsing XML in CR2008 Post Reply Post New Topic
Author Message
swank
Newbie
Newbie


Joined: 23 Apr 2009
Online Status: Offline
Posts: 2
Quote swank Replybullet Topic: Parsing XML in CR2008
     Posted: 23 Apr 2009 at 2:44pm
Is there a way to parse XML strings in crystal reports?

I have a SQL database as my data source and one of the database fields I'm pulling contains an XML string. I need to parse the XML elements and put them into report fields. I can't find a simple way to do this.


Edited by swank - 23 Apr 2009 at 2:59pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 24 Apr 2009 at 6:47am

I don't think you can, but Crystal surprises my sometimes.  Crystal thinks of the data in a cell as just that data, not as another table. 

If you use a stored proc, you could probably populate a new table with a link to the original table (haven't had a need to attempt this), then you could return both tables Crystal and display from there.
 
HTH
IP IP Logged
swank
Newbie
Newbie


Joined: 23 Apr 2009
Online Status: Offline
Posts: 2
Quote swank Replybullet Posted: 24 Apr 2009 at 8:32am
Thank you for the reply lockwelle.

I'm trying to avoid changes on the database server just for a report. I've seen User Function Libraries advertised with XML functionality but the ones I've seen so far cost money so I haven't tested them yet. I might need to pick one up if I can't find a better solution.

The other alternative I've come up with so far is to create formula fields and use the built in string functions to parse out the elements.


Edited by swank - 24 Apr 2009 at 8:33am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum