locked
Error RRS feed

  • Question

  •       

                 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 

     

    Thursday, March 15, 2007 10:57 AM

Answers

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

    Shyam

    Thursday, March 15, 2007 12:35 PM

All replies

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

    Shyam

    Thursday, March 15, 2007 11:09 AM
  •  

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

    Thursday, March 15, 2007 11:32 AM
  • 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

    Thursday, March 15, 2007 11:34 AM
  •  

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

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Thursday, March 15, 2007 12:02 PM
  • 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

    Thursday, March 15, 2007 12:13 PM
  •  

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

    Thursday, March 15, 2007 12:29 PM
  • IIf(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value) < 15, CODE.CheckSignificantDate(DateDiff(DateInterval.Day,Parameters!ToDate.Value,Parameters!FromDate.Value)), 0)

    Shyam

    Thursday, March 15, 2007 12:35 PM
  •  

                  But still I am getting the same problem.

    Thursday, March 15, 2007 12:45 PM
  •  

              Thanks Shyam I got the solution 

    Thursday, March 15, 2007 1:06 PM
  •   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 "

      

      

    Thursday, March 15, 2007 1:42 PM