Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

using Err.Raise in SSRS 2008

$
0
0
Hi bro !!!
Now i want to custom validate for some field by using Err.Raise.
I code in code tab(report property):
 Collapse | Copy Code
Public Function CheckDate(StartDate as Date, EndDate as Date) as Integer
Dim msg as String
                msg = ""
                If (StartDate > EndDate) Then
                                  msg="Start Date should not be later than End Date"
                                Err.Raise(22000, "VBCore.Utility",msg)
                End If
 
End Function
I add a parameter X with default value expression :
=Code.CheckDate(Parameters!StartDate.Value,Parameters!EndDate.Value)
 
But when i run report, it displays 
"The defaultvalue expression for the parameter "X" contains error: Start Date should not be later than End Date"
 
Is it right ???
I want to display only : "Start Date should not be later than End Date".
Is it possible ???
if i dont add default value for parameter X can i run function CheckDate when run report ???

Viewing all articles
Browse latest Browse all 20764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>