Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: SQL Expression Field Post Reply Post New Topic
Author Message
mash
Newbie
Newbie


Joined: 16 Mar 2012
Online Status: Offline
Posts: 2
Quote mash Replybullet Topic: SQL Expression Field
     Posted: 16 Mar 2012 at 10:27am
Hi All,
 
I am new to CR.  I have version 11.  I am trying to filter my results so that I only include records that have a count of 1.  I am doing this by joining two tables together.  After putting this query into the SQL Expression Field, and then setting my selection criteria for this SQL Expression Query = 1, I get no hits at all. 
 
Where do I need to look to troubleshoot this problem?
 
Here is my entire query (found in my record selection formula editor):
isnull ({PARKCITE.COURTDATE}) and
{PARKCITE.RECSTATUS} = "CL" and
{PARKCITE.TOTALNSFFEESPAID} <= 0.00 and
{PARKCITE.RECCLEAREDREASON} in ["DP", "DPC", "PD"] and
not ({PARKCITE.SECTOR1} startswith "NSF") and
{@ThisYear} = {@YearRecStatusDate} and
tonumber({@LastMonth}) = {@MonthRecStatusDate} and
{PARKCITE.TOTALCASHPAID} = {PARKCITE.TOTALFINESANDFEES} and
{%chargebacks} = 1.00
 
Here is my SQL Expression (named chargebacks):
(select count(*) from etecdba.parkcite
where uniquekey = view_parkmaster_payment.parentkey)
 
Where do I need to look to troubleshoot this problem?
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 16 Mar 2012 at 12:24pm
try going into
database tab >> show SQL Query
and check if every thing is right.
IP IP Logged
mash
Newbie
Newbie


Joined: 16 Mar 2012
Online Status: Offline
Posts: 2
Quote mash Replybullet Posted: 19 Mar 2012 at 4:06am
Here is my select statement:
SELECT "PARKCITE"."ISSUENO", "PARKCITE"."ISSUEDATE", "PARKCITE"."RECSTATUSDATE", "PARKCITE"."RECSTATUS", "PARKCITE"."SECTOR1", "PARKCITE"."RECCLEAREDREASON", "PARKCITE"."TOTALCASHPAID", "PARKCITE"."TOTALFINES", "PARKCITE"."VIOCODE", "PARKCITE"."TOTALNSFFEESPAID", "PARKCITE"."COURTDATE"
 FROM   "ETECDBA"."PARKCITE" "PARKCITE"
 WHERE  "PARKCITE"."TOTALNSFFEESPAID"<=0 AND "PARKCITE"."TOTALCASHPAID">15 AND ("PARKCITE"."RECCLEAREDREASON"='DP' OR "PARKCITE"."RECCLEAREDREASON"='DPC' OR "PARKCITE"."RECCLEAREDREASON"='PD') AND "PARKCITE"."SECTOR1" NOT  LIKE 'NSF%' AND "PARKCITE"."RECSTATUS"='CL' AND "PARKCITE"."COURTDATE" IS  NULL
 
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