Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Help with XML snippet stored in SQL Recordset Post Reply Post New Topic
Author Message
tpattison
Newbie
Newbie


Joined: 08 Jan 2007
Online Status: Offline
Posts: 2
Quote tpattison Replybullet Topic: Help with XML snippet stored in SQL Recordset
    Posted: 08 Jan 2007 at 10:24am
I am building a report in Crystal Reports XI and I have a few XML snippets stored in a SQL table that I need to render as subreports. I have the corresponding XSD & XSL files for validation & display but I do not know how to perform the transform inside of Crystal Reports to render the content correctly. Anyone on here know how? I checked the XML & ADO.NET XML drivers but both expect a file on the drive not XML content returned as part of a recordset from a Stored Procedure.

Thanks,
Tim
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 08 Jan 2007 at 10:48am
Unfortunately I've never done this before. However, I have two new SQL books coming in from Amazon.com later this week and one of them covers XML in SQL Server. I'll see if it sheds any light on the matter.

Maybe someone else on the forum can help out?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
tpattison
Newbie
Newbie


Joined: 08 Jan 2007
Online Status: Offline
Posts: 2
Quote tpattison Replybullet Posted: 08 Jan 2007 at 10:59am
Thanks Brian. This has me completely stumped. I was pulled into this project with it 75% complete and all design work out of my hands. I have the report 85% complete with only the XML content stored in memo fields in the recordset left to add to the report.

Is there any way to add HTML content to a subreport in Crystal XI? If so I can have an ASP page create the needed html files for inclusion and put them on the filesystem somewhere.

I was thinking this might be a viable option for the XML content as well. Use a stored procedure in an ASP page to get the XML content out of the DB and using FSO to write it out to a XML file on the filesystem. The only issue I have with this is that the XML content needs to be transformed to HTML since each section can be any format the user decided to enter (i.e. plain text, Table based data, tabular data, etc.).

Any recommendations?

Tim
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 08 Jan 2007 at 11:08am
Yes, you have quite a project on your hands. Re Cyrstal Reports displaying HTML, you can format a Text object to dislay as HTML. It is one of the settings on the Format Expert dialog box. If SQL Server can combine XML with an XSLT stylesheet then you could get the stored procedure to return that as a string and display it in a text object. But I have no idea if SQL can do anytype of XSLT conversions. Another idea (another longshot...) is to see if there is a third-party utility available that does XSLT conversions and call that from Crystal Reports as a user defined function.

Clearly, this is not a trivial task and hopefully someone else has done something similar and can help out.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.027 seconds.