By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

Use Crystal Report to get the Current Date

100+
P: 143
I need to create a field in formula field of crystal report (8.5) to get the current date according to my AmendNo field in the report...

'[AmendDate: ' + Trim(ToText({v_pohdr.AmendDate},0)) +']'

I m putting this formula but is telling me the string is required

Need Help
Jan 11 '08 #1
Share this Question
Share on Google+
8 Replies


QVeen72
Expert 100+
P: 1,445
Hi,

Try This :

'[AmendDate: ' + ToText({v_pohdr.AmendDate}) + ']'

You had given ToText(Fieldname, 0), This will be usefull if Fieldname is Decimal Variable,
0 -refers to Round-Off. and it gives error for Dates

Regards
Veena
Jan 11 '08 #2

100+
P: 143
My field is AmendDate and the format is datetime.... this formula is not giving any error but i m not getting the date... the field is empty



Hi,

Try This :

'[AmendDate: ' + ToText({v_pohdr.AmendDate}) + ']'

You had given ToText(Fieldname, 0), This will be usefull if Fieldname is Decimal Variable,
0 -refers to Round-Off. and it gives error for Dates

Regards
Veena
Jan 11 '08 #3

Expert 5K+
P: 8,434
Can you give us the specific details of the error please?
Jan 11 '08 #4

100+
P: 143
i have a report in crystal report... thr is a field called AmendNo which can be 0,1 or 2.. i Have to create a new field called AmendDate which has to be current date and appear when the AmendNo is 1 or 2..
i made a new column in my table which the AmendNo is taking from and add the column to my view which is using in my report and add the AmendDate where ever the AmendNo is thr in my VB program...
i made the AmendDate field in my report throug the above formula but the field is empty and not showing any date...
Can u help me out?
Jan 11 '08 #5

QVeen72
Expert 100+
P: 1,445
Hi,

So, you want to print Date if AmendNo > 0 , then put the condition in formula:

Expand|Select|Wrap|Line Numbers
  1. If {v_pohdr.AmendNo} > 0 Then
  2.    [AmendDate: ' + ToText({v_pohdr.AmendDate}) + ']'
  3. Else
  4.    ' '
  5.  
Also Check this option > "Convert Null To Defaults"
After placing the formula, Also Check the Physical width of the Formula..


Regards
Veena
Jan 11 '08 #6

100+
P: 143
Thank u very much for ur help

this formula works but dont convert the Null to Default

If {v_pohdr.AmendNo} > 0 Then
'Convert Null To Defaults'
Jan 11 '08 #7

QVeen72
Expert 100+
P: 1,445
Hello,

I Told You To Check The Cr Option In Designer..

Regards
Veena
Jan 11 '08 #8

100+
P: 143
Ya sorry ... got it
thankx alot for ur help.... God Bless
Jan 11 '08 #9

Post your reply

Sign in to post your reply or Sign up for a free account.