Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Procedure Paremeters (Datetime) changes to NULL in compiles version 7


I have created a report based on a SQL 2005 procedure with start 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 te .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)


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))


count(*) as 'Line_count',


invoice_head.created_at as 'InvDate' ,


Kind Regards,


Former Member
Not what you were looking for? View more on this topic or Ask a question