Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: HEELLP!!!! Post Reply Post New Topic
Author Message
boythesis10
Newbie
Newbie
Avatar

Joined: 24 Jul 2011
Location: Philippines
Online Status: Offline
Posts: 3
Quote boythesis10 Replybullet Topic: HEELLP!!!!
     Posted: 24 Jul 2011 at 10:32pm
Im having problems with my Display formula in my REPORT.
This is my Code and ERROR always appear:

A number, currency, datetime, etc or string is required here.

{ovr_1.LoanTypID} in ["02", "04"] and
{ovr_1.StartPayDate} <= {?Pm-@ReportDate} and
({ovr_1.EndPayDate} >= {?Pm-@ReportDate} or {ovr_1.EndPayDate} <= {?Pm-@ReportDate}) and
{ovr_1.LocID} = 27 and
{ovr_1.AccTypID} = "1" and *and cursor is pointed in this area*
({View_LastTransFIN.LastTrans} > (cdate({ovr_1.Year},{ovr_1.Month},cdbl({ovr_1.DueDateFin})))) <= {?Pm-@ReportDate}

I dont know what's wrong here.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 25 Jul 2011 at 3:00am

if this is not a string field

{ovr_1.AccTypID} = "1"
remove the " around the 1.
i would also go line by line to see where your problem lies
sharona
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Jul 2011 at 4:15am
i am reading the last line as a boolean evaluation
({View_LastTransFIN.LastTrans} > (cdate({ovr_1.Year},{ovr_1.Month},cdbl({ovr_1.DueDateFin}))))
being <= a date param
{?Pm-@ReportDate}
which does not make sense.
IP IP Logged
boythesis10
Newbie
Newbie
Avatar

Joined: 24 Jul 2011
Location: Philippines
Online Status: Offline
Posts: 3
Quote boythesis10 Replybullet Posted: 25 Jul 2011 at 2:41pm
The Last line indicates that
last transaction date is lesser that duedate and display these if they are lesser that the REPORTDATE.
IP IP Logged
boythesis10
Newbie
Newbie
Avatar

Joined: 24 Jul 2011
Location: Philippines
Online Status: Offline
Posts: 3
Quote boythesis10 Replybullet Posted: 25 Jul 2011 at 2:42pm
Originally posted by sharona

if this is not a string field

{ovr_1.AccTypID} = "1"
remove the " around the 1.
i would also go line by line to see where your problem lies


it presents an error if i remove the " though. Thanks for the tip.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jul 2011 at 4:02am
Originally posted by boythesis10

The Last line indicates that
last transaction date is lesser that duedate and display these if they are lesser that the REPORTDATE.
This may be what you want it to do but that is not how it is written.
You are evaluating this first
({View_LastTransFIN.LastTrans} > (cdate({ovr_1.Year},{ovr_1.Month},cdbl({ovr_1.DueDateFin}))))
which is going to return a TRUE or a FALSE then you are comapring TRUE or FALSE to 
{?Pm-@ReportDate}
which is what it is choking on.
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