Lovericky


I am getting the following error

"An error occured during local report processing.Error during processing of 'Validate' report parameter "

Any idea about this error




Re: Error

Shyam Sundar


Do u have any default values or available values for your 'Validate' parameter If yes, can u give the details

Shyam






Re: Error

Lovericky

Yes I have default values.That value depends on user selection.If the date difference is less than 15 days.Script will be raised(That I have written using custom code).






Re: Error

Shyam Sundar

can u pls type the whole custom code you have written and then the expression you have used for the default value of the parameter

Shyam





Re: Error

Lovericky

CUSTOM CODE:

Function CheckSignificantDate(i as integer) as Integer
Dim msg as String

msg = ""
If ( i = 15 ) Then
msg=" Date Diff should be more than 15 Days"
End If

If msg <> "" Then
MsgBox(msg, 16, "Report Validation")
Err.Raise(6,Report) 'Raise an overflow
End If
End Function

EXPRESSION:

=CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))

Here I am facing one more problem.In custom code if I take condition (i < 15), for each value script is raising.(i.e for every number.ex: 1,24,33,67..... )





Re: Error

Shyam Sundar

why is that extra comma at the end of your expression (marked in red below)

CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value,))

You are calling the code for all values, so better check the date differentce in the expression itself (using IIf function) and then call the code.

Shyam





Re: Error

Lovericky

Could please help me how to call that function using IIF condition.I can't able to do.





Re: Error

Shyam Sundar

IIf(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value) < 15, CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value)), 0)

Shyam





Re: Error

Lovericky

But still I am getting the same problem.





Re: Error

Lovericky

Thanks Shyam I got the solution





Re: Error

Lovericky

Dates problem was solved.After generation of script I am getting the following error.

"An error occured during local report processing.Error during processing of 'Validate' report parameter "