on 05-19-2011 12:04 PM
Hi,
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)
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
Change to view and will upgrade to 2008
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eric,
Wow, version 7 is over 12 years old so I doubt you'll get a working answer. Most people will tell you to upgrade but I'm guessing compiled reports are what you need and if I'm right, version 7 was the last version to have that.
I believe there were 3 updates to version 7 and they may still be available from the support download page. Something in the fuzzy memories of the late 90s is telling me there was a problem with dates at runtime. I know there were changes to how Crystal dealt with date parameters. New APIs were included to properly deal with them.
I'd have to recommend seeing if the updates are there or see about moving away from using Compiled Reports.
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.