Hello,

I am working on a report in SQL Server Reporting Services 2000.

Code:
SELECT TOP 200 * FROM necc.dbo.vw_rop_report_profit_per_call
    WHERE [Call Day] = case when @callDate = '' then [Call Day] else @callDate end
>> I have a promt for the user to enter the date.
>> If the user does not enter any date, then the report will show all the first 200 records, without the where condition.
>> This query is running too slow.

To increase the speed of the report , could somebody help me build the where clause only when something is in the filters ?

Thank you,