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.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
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.
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.
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