There are 3 potential reasons for no data in crystalreport:
1) uppercase/lowercase inconsistency
To correct this problem just use formula like this:
UpperCase({Customer.Name}) = "BOB"
2) unwanted spaces appear in selection formula
For example formula like this:
"Mr. " in {Customer.Title}
will not find any matches because of "Mr." (without of space) in the title.
3) uncorrect dates formats
For example: on the sql server dates are presented as: "
MM/dd/yyyy", but on the local comupter: "
yyyy/MM/dd"
Change the date format on your sql server or on the local computer or use
SET DATEFORMAT ymd;
command in your sql question.
So... first check the formulas!
If solution above is not helpful, ask your database for count of records before showing crystalreport or use stored procedure (recommended) with the body like this:
IF NOT EXISTS( Field1, Field2, Field3
FROM [DatabaseName].[dbo].[TableName1]
WHERE (Field4 BETWEEN @dFrom AND @dTo ))
BEGIN
SELECT 'No History within Date Range Selected' AS [CommentField]
ELSE
SELECT Field1, Field2, Field3
FROM [DatabaseName].[dbo].[TableName1]
WHERE (Field4 BETWEEN @dFrom AND @dTo)