Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting a Crystal Report as XML and importing to Excel 2

Status
Not open for further replies.

krpurcel

IS-IT--Management
Dec 1, 2003
77
0
0
US
I'm making my first attempt at exporting data from Crystal Reports in the XML format to be imported into Xcelsius. I'm using Crystal Reports 2008 ver 12.2.0.290. I am exporting the data using the default Crystal Reports XML schema.

When I go to EXCEL (Excel2003) DATA/FROM OTHER SOURCES/FROM XML DATA IMPORT and import the XML, I get a couple different error messages (both attached). The first one says "the following schema elements and structures cannot be mapped to a worksheet." The second one says "The number of elements exceeds the number of columns available in the worksheet. Some data will be truncated.

The Crystal Report gets it's data through an add command, and there are only 9 fields being returned by the add command. There is also one formula in the report header (the report utilizes Ken Hamady's Holiday List concept).

I don't understand why with only 9 fields and one formula the xml is generating so many columns that they won't all fit in an xlsx. The actual data in the xml file appears in just 4 of the columns, CX - DA. All the other columns are blank.

I am an XML neophyte. This is my first dive into this pool. Is there a way to limit the export to just the columns needed? Do I need to be creating my own schema? If so how do I add it so Crystal Report uses it when exporting to XML? ALso, the XML export refers to the header section (Where the Holiday List is supressed) and the details section. Can I simply remove the headers section to keep it from being pulled in?

I've attached the exported xml file from Crystal, the error messages and the spreadsheet where I imported the XML data for review. Sorry if this has already been asked and answered. I did search for XML topics, but all the ones I found dealt with creating a Crystal Report from an xml file. I'm trying to go the other direction and export XML from Crystal that I can use in Xcelsius.

If I ommitted any important info please let me know and I will update the post. Any help in increasing my minute knowledge of XML is appreciated!

 
bump. Still hoping for some feedback
 
The XML export schema is a rpt file schema, so doesn't really go into other formats quite so easily.

You might want to look at my Export UFL that will take report data and build a CSV or XML file while viewing the report. I'll be adding a format direct to XLS shortly.
 
krpurcel:

Since you are using CR 2008, you should be able to customize the XML. I have read a little about it, but I have not tried it (File-Report Options-Legacy XML Expert).

I hope this helps.
 
Bruce & Kray,

Thank you both for your suggestions! I will check out Export UFL and also read about customizing the XML.

Thanks for responding!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top