Search code examples
activereports

In ActiveReportsJS is it possible to pass parameters to a Web Service?


I have a report which data source is a Web Service API, the API requires some parameters and I want to pass them in the "Content URI" property of the data source.

Is it possible to assign parameters to the Content URI?

Note: when I write something like

jsondoc=http:\localhost:3480\resource.json?param1=&Parameters!Data.Value

The URI is automatically changed to

..\..\..\..\applications\ActiveReportsJS_Designer\jsondoc=http:\localhost:3480\resource.json?param1=&Parameters!Data.Value

and it is not possible to load the data source from the Web Service

Reference: https://www.grapecity.com/activereportsjs/docs/v1/DeveloperGuide/ActiveReportsJSViewer/Features

ActiveReportsJS DataSource


Solution

  • here are steps that are currently to be used for parametrized web-service requests as a report's data source:

    • Start with the static URI, for example jsondoc=http:\localhost:3480\resource.json?param1=&Parameters!Data.Value
    • Add the data set, fill out the JSON path to obtain the fields list.
    • Modify the data source URI so that it looks like ="jsondoc=http:\localhost:3480\resource.json?param1=" & Parameters!Data.Value - this the expression that evaluated at runtime based on the parameter's value.