Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Procedure Dates not passed (Version 7) Post Reply Post New Topic
Author Message
Phantom
Newbie
Newbie


Joined: 05 Jun 2009
Location: Australia
Online Status: Offline
Posts: 2
Quote Phantom Replybullet Topic: Procedure Dates not passed (Version 7)
     Posted: 19 May 2011 at 1:14am
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
IP IP Logged
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