Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: STRING REQUIRED HERE (ERROR) Post Reply Post New Topic
Author Message
vpriyanka2001
Groupie
Groupie


Joined: 28 May 2009
Online Status: Offline
Posts: 59
Quote vpriyanka2001 Replybullet 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 IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet 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 IP Logged
vpriyanka2001
Groupie
Groupie


Joined: 28 May 2009
Online Status: Offline
Posts: 59
Quote vpriyanka2001 Replybullet 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 IP Logged
saoco77
Senior Member
Senior Member


Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Quote saoco77 Replybullet 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 IP Logged
vpriyanka2001
Groupie
Groupie


Joined: 28 May 2009
Online Status: Offline
Posts: 59
Quote vpriyanka2001 Replybullet 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 IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet 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 IP Logged
vpriyanka2001
Groupie
Groupie


Joined: 28 May 2009
Online Status: Offline
Posts: 59
Quote vpriyanka2001 Replybullet Posted: 09 Sep 2009 at 6:05am
Thanks,
 It worked.
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