Print Page | Close Window

Help with XML snippet stored in SQL Recordset

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=95
Printed Date: 17 May 2024 at 9:35pm


Topic: Help with XML snippet stored in SQL Recordset
Posted By: tpattison
Subject: Help with XML snippet stored in SQL Recordset
Date 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



Replies:
Posted By: BrianBischof
Date 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>


Posted By: tpattison
Date 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


Posted By: BrianBischof
Date 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>



Print Page | Close Window