Hi, I have created a report based on a SQL 2005 procedure with start and end date parameters.
When I run the report in the designer mode and refresh data the dates are correctly passed to the procedure and report produced. I then compile the report to a .exe file and run report. When I run the .exe and refresh data with new start and end date no data is retreived. I checked with SQL Profiller and found that the .exe was not passing the dates to the procedure, both dates change to NULL. Procedure NULL,NULL
I have used Crystal reports 2008 and not had this issue but in this older version the problem presents.
Can anyone help to resolve the issue or point me in the right direction.
-----------------------Extract from procedure ALTER Procedure dbo.Revenue (@StartDate Datetime, @EndDate DateTime) as Declare @Start DateTime Declare @End DateTime set @Start = (select dateadd(day, datediff(day, 0, @StartDate), 0)) set @End = ( select dateadd(day, datediff(day, 0, @EndDate), 0)) select count(*) as 'Line_count', c_service_call.sa_person_id, invoice_head.created_at as 'InvDate' , ...........................etc Kind Regards,
Eric
|