| Author |
Message |
vpriyanka2001
Groupie
Joined: 28 May 2009
Online Status: Offline
Posts: 59
|

Topic: STRING REQUIRED HERE (ERROR) Posted: 03 Sep 2009 at 9:25am |
|
I have this Formula, I am changing the database for the report.
Old Formula {quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and {quote.date_effective} = {?Quote Eff Dates}
New Formula Field is a NVARCHAR {quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and {quote.date_eff_ccyymm} = {?Quote Eff Dates}
I am getting String Required here at {?Quote Eff Dates}
Please help.
Edited by vpriyanka2001 - 09 Sep 2009 at 8:43am
|
IP Logged |
|
|
|
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
|

Posted: 03 Sep 2009 at 10:42am |
|
The two fields are in different formats (date and text) and need to be in the same format to be set equal to each other.
Using either of the two formulas should allow you to convert a date to a string or vice versa.
Date({table.field)
totext({table.field})
You can also avoid using a formula by changing the data type on your parameter {?Quote Eff Dates} to match that of the {quote.date_eff_ccyymm} field.
Hope this helps.
|
IP Logged |
|
vpriyanka2001
Groupie
Joined: 28 May 2009
Online Status: Offline
Posts: 59
|

Posted: 03 Sep 2009 at 11:24am |
|
Can you please explain me with my Formula, I am very new to crystal and am not being able to do it. This is my formula.
{quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and {quote.date_eff_ccyymm} = {?Quote Eff Dates}
|
IP Logged |
|
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
|

Posted: 03 Sep 2009 at 12:05pm |
|
I'm not sure which data type each of the field is in. I think one of the following should work
{quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and
{quote.date_eff_ccyymm} = totext({?Quote Eff Dates})
or
{quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and
totext({quote.date_eff_ccyymm}) = {?Quote Eff Dates}
|
IP Logged |
|
vpriyanka2001
Groupie
Joined: 28 May 2009
Online Status: Offline
Posts: 59
|

Posted: 07 Sep 2009 at 8:10am |
|
{quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and
{quote.date_eff_ccyymm} = totext({?Quote Eff Dates})
Getting Error: A number, currency, boolean amount or string is required here.
{quote.lifecycle_status} in ["LOSTQUOTE", "QUOTE"] and
totext({quote.date_eff_ccyymm}) = {?Quote Eff Dates}
Error': String is required here.
Parameter is using Type as : DATE
|
IP Logged |
|
Jyothi Yepuri
Senior Member
Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
|

Posted: 07 Sep 2009 at 9:16pm |
|
try
Date({quote.date_eff_ccyymm}) = {?Quote Eff Dates}
I assuming {quote.date_eff_ccyymm} is datetime field
Jyothi
|
IP Logged |
|
vpriyanka2001
Groupie
Joined: 28 May 2009
Online Status: Offline
Posts: 59
|

Posted: 09 Sep 2009 at 6:05am |
|
Thanks, It worked.
|
IP Logged |
|
|
|