Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: check if a field exists in a XML Post Reply Post New Topic
Author Message
gupd
Newbie
Newbie
Avatar

Joined: 06 Aug 2009
Location: Brazil
Online Status: Offline
Posts: 3
Quote gupd Replybullet Topic: check if a field exists in a XML
     Posted: 10 Aug 2009 at 7:14am
Hi,

How do I check if a field exists in a XML in Crystal's formula editor, so that it wont give me an error saying the field does not exist?]

Thank´s
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 10 Aug 2009 at 7:18am

there isn't a way, that I know of.  You should have defined the field in the xsd file that is the structure of the data that the report bill using.  If it is in the structure, then Crystal will see it as a NULL value, if the field is not in the structure, you can't use it in the report.  If you developed the report with one structure and send another, you will get this sort of error.

I don't believe that Crystal was designed to handle changing structures (you can't add or subtract fields dynamically), so the field is always there. 
 
I would ensure that the structure of your data matches the structure that Crystal is expecting.
 
HTH
IP IP Logged
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