Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Generate report from any xml file Post Reply Post New Topic
Author Message
benny
Newbie
Newbie


Joined: 14 Aug 2009
Location: Finland
Online Status: Offline
Posts: 1
Quote benny Replybullet Topic: Generate report from any xml file
    Posted: 14 Aug 2009 at 3:24am
I know it is possible to generate a report from an xml file, but I am looking for a way to generate a report from any xml file.
All I know about the xml file is that it has a maximum of 10 columns. I don't know the name of the columns.
So in stead of accessing the data using the column name I would like to access the data using the column index.

Who knows how I can create such a report, based on a unknown xml file?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 14 Aug 2009 at 6:26am
can't do it.  Look at how Crystal operates, it references a structure of data. If the data that should be displayed is in the dataset, all is good, but if a field is missing, it crashes.
 
You could get around this by having all of your xml files have the same name, like col1, col2, etc.
 
Or you could write an app, that could rename all of the tags, but you would need to know the schema of a xml.  In some cases, if a field is null, the xml tag is missing (this is how VS2005 write data to xml), so without the table schema you can't adjust tags(correctly).
 
Just as you can't write a report to 'randomly' access fields in a table, you can't randomly access fields in an XML file, because it is a table.
 
HTH
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.031 seconds.