August 16, 2010 at 2:51 am
Hi,
I have a report which dispalys data on the basis of start date and end date. My report is working fine. But I want to add a validation check that End date should always be greater than Start date, for this I am doing following steps:
1. I Report Properties->Code tab I have written following VB code:
Public Function CheckSignificantDate( Start_dt As Date, End_dt As Date) As Integer
Dim msg As String
msg = ""
If (Start_dt > End_dt) Then
msg = "Start Date should not be later than End Date"
End If
If msg <> "" Then
MsgBox(msg,7, "Report Validation")
Err.Raise(6,Report)
End If
Return 0
End Function
2. Then I have add one more hidden parameter with allow blank value check mark, available values none,Default values->Specify values-> added one expression(CODE.CheckSignificantDate(Parameters!Start_dt.Value,Parameters!End_dt.Value) but in this expression I am getting error as "Unreconized Identifier".
Am I missing any assemblies or ding somting wrong. I have trie a text box approach but it would not solve my requirement.
Please help me:(
August 16, 2010 at 7:11 am
I would just make the end date a cascading parameter based on the start date chosen. To me at least it seems much simpler than what you are trying to do.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply