Friday, February 17, 2012

Error

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

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

Shyam

|||

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).

|||

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

|||

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..... )

|||

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

|||

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

|||

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

Shyam

|||

But still I am getting the same problem.

|||

Thanks Shyam I got the solution

|||

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 "

No comments:

Post a Comment