Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Command list for Crystal XI Post Reply Post New Topic
Author Message
GregD
Newbie
Newbie
Avatar

Joined: 31 Aug 2011
Location: Canada
Online Status: Offline
Posts: 5
Quote GregD Replybullet Topic: Command list for Crystal XI
     Posted: 31 Aug 2011 at 4:35am
Does anyone have a complete list of the command expressions that are available in Crystal XI?  I know the basic ones such as SELECT, WHERE, UNION, IF.   Are there any others?
 
Specifically, i'm looking for a way to manipulate the date.  In our database, our date is stored in a julien number format.  I created a parameter within the command, but it is created in a date format.  The easiest solution to this is to convert the parameter date format to the julien by using the DATADIFF command, but the command does not seem to recognize that expression.
 
Any ideas?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 31 Aug 2011 at 5:03am
Any syntax that is available in your database is available in the command.  Crystal just passes the query to the database and, other than setting the parameter values, does no internal processing with it that I'm aware of.
 
-Dell
IP IP Logged
GregD
Newbie
Newbie
Avatar

Joined: 31 Aug 2011
Location: Canada
Online Status: Offline
Posts: 5
Quote GregD Replybullet Posted: 31 Aug 2011 at 5:26am
This is the condition I am trying to put into my command:
 
GLDGL>=(111,001+DATEDIFF('d",#2011/01/01#,{?Start Date}))
 
GLDGL is the field from the database stored in julien.
{?Start Date} is the parameter putting it in a date format.
 
When i put this into crystal itself, it work perfectly, but when i try to put it into the command i get the following error:
 
Failed to retrieve data from database.
Numeric constant 01# not valid. [Database Vender Code: -103]
 
I tried different things like changing the # to a ', but the error just changes to:
 
DATEDIFF in *LIBL type *N not found. [Database Vender Code: -204]
 
Any ideas?
 
IP IP Logged
GregD
Newbie
Newbie
Avatar

Joined: 31 Aug 2011
Location: Canada
Online Status: Offline
Posts: 5
Quote GregD Replybullet Posted: 02 Sep 2011 at 5:11am
i was able to resolve this.  i changed my command to read
GLDGL>=(111000+({?Start Date}-DATE(01012011)))
and now is seems to work.
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