March 5, 2008 at 3:08 am
Urgent - head of prof services wants this report today.
I have a report using two date parameters to run a report between 2 dates based on one of the datetime cols in table.
Used 2 report parameters both of type datetime
Query includes:-
Where ( OITDate >=(@StartDate)) And ( OITDate <=(@EndDate))
Arithmetic overflow error converting expression to datatype datetime (MS error 8115) if I run in query mode.
However the report runs without errors (albeit without returning expected data) in preview mode.
March 5, 2008 at 3:17 am
When you run it in query mode, what are you typing in for the date? Also, make sure you don't put quotes (single or double) around the date you type in.
Regarding the report returning the wrong data, have you specified that you want the report parameters to be datetime parameters? Go to Report > Report Parameters. Then in the second drop-down list in the Properties pane make sure you select DateTime. The default is string.
March 5, 2008 at 3:43 am
Yes, the date report parameters are of type datetime.
The user picks the dates from a calendar icon on preview
March 5, 2008 at 7:28 am
I don't know if this will fix the problem, but you could change:
Where ( OITDate >=(@StartDate)) And ( OITDate <=(@EndDate))
to
Where OITDate between @StartDate And @EndDate
The error sounds like one of the dates is invalid when you run the report.
March 5, 2008 at 7:45 am
Changed this and seems OK. Looks neater as well.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply