Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: Error when SQL table returns no results Post Reply Post New Topic
Author Message
amgaudet
Newbie
Newbie
Avatar

Joined: 24 Sep 2007
Location: Canada
Online Status: Offline
Posts: 2
Quote amgaudet Replybullet Topic: Error when SQL table returns no results
    Posted: 24 Sep 2007 at 8:12am

I'm currently using a simple SQL query to create a table in my report.  The query basically looks at the record date using a user imputed paramater as well as a credit card number entered by the user as well.  The result is a table containing only the applicable records.

My problem occures when the CC number is not found.  Rather than get a "No data found" error or any type of message at all, the report freezes Crystal at the "Accessing Database" stage.  If there is a record that fits the criteria, the report works perfectly.
 
Has anyone else seen this and hopefully found a way around it?
 
Thank you,
André
IP IP Logged
p&ccrystal
Newbie
Newbie
Avatar

Joined: 06 Sep 2007
Location: United States
Online Status: Offline
Posts: 18
Quote p&ccrystal Replybullet Posted: 04 Oct 2007 at 12:08pm

How is the Select statement written? It may have to do with the wording in the select statement. Do you use an input mask so that users cannot enter data that Crystal does not recognize as a date or whatever field type used for the CC number?

An invalid data type can cause Crystal to freeze.
10 year user of Crystal Reports - recently implemented Crystal Server 11.5
IP IP Logged
amgaudet
Newbie
Newbie
Avatar

Joined: 24 Sep 2007
Location: Canada
Online Status: Offline
Posts: 2
Quote amgaudet Replybullet Posted: 04 Oct 2007 at 12:16pm
The statement is quite simple:
 
SELECT *
FROM   ARInvoiceDetails
WHERE  TransactionDate >= {?Date1} AND TransactionDate <= {?Date2} AND TicketNumber= {?CC Number}
 
I'm the only one that uses this report and I do enter the card with the ' on each end therefore I didn't have to use an input mask however that is a good idea.
 
The dates parameters are in a date variable and the CC number Parameter is a string.
 
Thanks for your help.
André


Edited by amgaudet - 04 Oct 2007 at 12:21pm
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.