Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 27 Jul 2012 at 11:53am
You can't use a function in an application to do this unless the function is in the database, in which case it can be called either in the select statement of a command or, if you're using just tables/views on your report, you can create a SQL Expression that will call the function.
If this is not in your database, you'll need to recreate the logic for it in a Crystal formula.
Joined: 30 Jul 2012
Location: United States
Online Status: Offline
Posts: 2
Posted: 30 Jul 2012 at 3:21am
I ran into this problem and created a variable called age today. The way it works is to subtract Date_of_birth from Current_date. This returns the number of days someone has lived. Then I divide that by 365 (yep I ignore leap years) which give me a number with lots of decimals. The next step if to kill those decimals, so round the number up and subtract 1.
Here is the code: Roundup((CurrentDate - {patient_current_demographics.date_of_birth}) / 365)-1
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