Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: XML and CurrentDate not that easy...like you think Post Reply Post New Topic
Author Message
tnwirtu
Newbie
Newbie
Avatar

Joined: 27 Oct 2009
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote tnwirtu Replybullet Topic: XML and CurrentDate not that easy...like you think
    Posted: 27 Oct 2009 at 9:37am
Hi All,
 
I'm trying to find solution for creating crystal report using xml files
 
as example:
 
<VISITORS>
  <VISITOR_NAME>TOM WANE</VISITOR_NAME>
  <COMPANY_NAME > COMPANY1<COMPANY_NAME />
  <TIME_IN>20/10/2009 11:46:29</TIME_IN>
  <SITE>OFFICE</SITE>
</VISITORS>
- <VISITORS>
  <VISITOR_NAME>CHRIS JONES</VISITOR_NAME>
  <COMPANY_NAME > COMPANY2<COMPANY_NAME />
  <TIME_IN>27/10/2009 11:47:23</TIME_IN>
  <SITE>OFFICE</SITE>
 </VISITORS>
 
I want to print visitors only with current date
 
I'm able to print
 
{VISITORS.TIME_IN} <= "CurrentDate"    
 
or
 
{VISITORS.TIME_IN} is any value
 
but not able to print
 
{VISITORS.TIME_IN} >= "CurrentDate" 
 
or
 
{VISITORS.TIME_IN} = "CurrentDate"   I want this but for some reason is not working report is blank
 
looks like all those formulas are not compatible with xml...
 
Could any one help or provide basic idea what to do?
 
Many Thanks
 
tnwirtu
IP IP Logged
tnwirtu
Newbie
Newbie
Avatar

Joined: 27 Oct 2009
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote tnwirtu Replybullet Posted: 28 Oct 2009 at 5:32am
Thaks for help...
 
I founded this.
 
for anyone who may need it for future the answer is:
 
{VISITORS.TIME_IN} >= Totext(CurrentDate)
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 28 Oct 2009 at 7:34am
yeah, XML is a red herring, once it is in CR, it is the same as any other datalink.  I you don't include a schema with you XML, this may fail if you do later specify a schema, as the schema might say that the Time_In field is a datetime and then the report will fail as the string and datetime don't match.
 
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.047 seconds.