Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Passing the value of a builtin to another builtin? Post Reply Post New Topic
Author Message
Maahes
Newbie
Newbie
Avatar

Joined: 26 Sep 2008
Location: United States
Online Status: Offline
Posts: 8
Quote Maahes Replybullet Topic: Passing the value of a builtin to another builtin?
     Posted: 08 Jan 2009 at 4:39pm
So obviously...I am not getting Crystal Syntax very well, it seems to be poorly documented in CR 9 as it lists examples in the CHM document that don't actually work if you try them in the editor. In any event, I'll describe what I'm trying to do. I'm setting up a membership certificate of a sort right? and I need to chop up the current date (whenever the report is ran), into Day month and year.

So The way it needs to look in the report is:

On this day the <Day> of <Month>, <Year>

For example: 19/04/1984 would read:

On this day the Nineteenth of April, One Thousand Nine Hundred Eighty-Four.

So I know there's a builtin called CurrentDate, and there's another called ToWord in string functions, and they give an example of converting at least at least a year like number to words this way in the CHM.

The problem is, I can't even get something to work to test the most basic passing method or really, much of anything at all. How would I go about passing just the last 4 digit value of Current Date to ToWords (XXXX, 0) ?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jan 2009 at 8:38am
Not sure if this will work in CR 9 but try this formula:
towords(day({datefield}),0) +
' of ' +
monthname(month({datefield}))
+ ', ' +
towords(year({datefield}),0)
 
The day field may be a problem as it returns "nineteen" not "nineteenth".
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