none
CreateObject("ADODB.Connection") in custom code on report

    Question

  • I have a report created in the Reporting Studio that works fine.  However when deployed to our report server it fails with "

    • Error during processing of ‘Report_Parameter_0’ report parameter. (rsReportParameterProcessingError)

    "

    The parameter in question is pulling its data from a custom function (vbscript) located in the code section of the report properties.  I have reduced the code problem to a single line as:

    CreateObject("ADODB.Connection")

    The test code snippet is:

    Public Function FetchRegions() as String()
      Dim aStr(3) as string
      Dim mConnection

      mConnection = CreateObject("ADODB.Connection")
      aStr(0) = "test"
      return aStr
    End Function

    So CreateObject has no issue when in my SSRS Dev, but when released to a reporting server it fails to run.  Comment out the createobject and all is fine (returns a single element arrange of 'test').

    I am wanting to using ADO in a parameter to eventually fetch some data from the DB (as opposed to creating a dataset in SSRS).  The reason is I am using snapshots on this report, but the data for the parameters needs to come from an external dynamic source via ADO I hope...

    Anyone have an idea?

    This is SSRS 2005 by the way.

    cheers

    Wednesday, November 06, 2013 10:06 PM

All replies