Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Custom function with set data field Post Reply Post New Topic
Author Message
Vincent
Newbie
Newbie
Avatar

Joined: 19 Nov 2009
Location: Australia
Online Status: Offline
Posts: 7
Quote Vincent Replybullet Topic: Custom function with set data field
     Posted: 23 Nov 2009 at 2:58pm

Hi,

I am looking at trying to create a custom function in Crystal 10 that will display only a date from a date/time field, where the date/time field is always from one particular table and field.
 
I know that I could just write a formula that will do it, but I use the same thing a million times in different reports.
 
I know how to give a default value to a custom function's vaiable, but I want the variable to be a default field.
 
I have created a formula that does this, and tried to extract that into the function, but then I get stuck. It ignores the fact that I have the field there.
 
Is there a way to do this?
 
Thanks
Vince
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 24 Nov 2009 at 6:24am
custom functions, by definition, cannot access datafields.  The custom function can format the variable, but it won't touch a datafield as they change all the time.
 
if the table.field are always the same, yeah, nothing to do that I know of except cut and paste.
IP IP Logged
Vincent
Newbie
Newbie
Avatar

Joined: 19 Nov 2009
Location: Australia
Online Status: Offline
Posts: 7
Quote Vincent Replybullet Posted: 24 Nov 2009 at 12:06pm
Fair enough.
Thanks for the information
 
Vincent
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