Perhaps somone can shed some light on this. I want to make sure the user doesn't set a Startdate > EndDate in a report.
I've done some thing like this:
Go to the Report Properties under the Report menu and place this code to the Code Tab.
Public Function CheckDate(SDate as Date, EDate as Date) as Integer
Dim msg as String
msg = ""
If (SDate > EDate) Then
msg="Start Date should not be later than End Date"
If msg <> "" Then
MsgBox(msg, 16, "Parameter Validation Error")
Err.Raise(6,Report) 'Raise an overflow
Then go to the Report Parameters and Add named it XXX with the datatype is string. Checked the Hidden and Allow blank value ckeckboxes. In Available Values choose Non-Queried and from Default Values choose Non-Queried in right side of textbox then press the
FX button then paste this code.
But I'm having problems with the =CODE.CheckDate( .Value) syntax.
SSRS errors out.
View Complete Post