Retrieve report parameters

Allows you to list and search for report templates.

URL

GET    /api/v1/report/{TemplateID}/parameters

Optional parameters

Parameter can be passed in URL as ?param=value or form-encoded in the request body.

Name

Values

Default

Function

format

json/xml

xml

Defines the format with which the ReportDataParameter object is serialized.

 

Result

An array of the type ReportDataParameter (see below) is returned.

Error codes (in addition to general error codes)

Status code

Status text

Explanation

403

ERR_ACCESS_DENIED

No access rights to report template / data source.

404

ERR_INVALID_TEMPLATE

Report template not found.

520

-

Error during export. A localized error message is in the request body (XML/JSON).

 

ExportResult object: IEnumerable<ReportDataParameter>

An array of ReportDataParameters is returned.

ReportDataParameter

string

Guid

The globally unique identifier of this parameter.

string

ParentGuid

If not null, it is the identifier of the parameter on which this parameter depends.

string

Name

Name of the parameter.

string

HelpText

Text which helps to understand the usage of the parameter.

bool

IsVisible

Visibility of the parameter.

object

Value

Value of the parameter.

IEnumerable<Choice>

Choices

IF Parameter has NO dependencies (ParentGuid == null) available choices will be here.

bool

SelectMultiple

Whether you can select multiple items.

bool

MayBeEmpty

Whether you can select no item.

bool

MayBeNull

Whether this parameter is may be null / is required.

ReportDataParameterSourceMode

SourceMode

The Mode of the Source of this parameter.

ReportDataParameterSourceType

SourceType

The Type of the Source of this parameter.

ReportDataParameterControlType

ControlType

The kind of control the user should see for the parameter.

 

The control for a parameter

ReportDataParameterControlType

Text

z.B. TextField

Date

z.B. DatePicker

BoolYesNo

z.B. Switch, RadioButtons

BoolTrueFalse

z.B. Switch, RadioButtons

bool

z.B. DatePicker and TimePicker

 

 

The SourceMode of a ReportDataParameter

ReportDataParameterSourceMode

Database

Database Source

Choice

List of Choices

EditableText

Simple editable text

 

The SourceType of a ReportDataParameter

ReportDataParameterControlType

Text

String

Numeric

Numeric string

Date

DateTime

Boolean

Boolean value

 

If the SourceMode is Database or Choice AND the parameter has no dependencies (ParentGuid == null), then all available choices are available in the Property Choices.

A single choice:

Choice

string

Key

The variable name (e.g. "[LLvar]AvABAAA") of this selection. The server replaces the prefix "var://" with "[LLVar]" to avoid drawing problems.

string

Value

The value / name of this selection.

bool

IsSelected

Whether this selection is already selected.

 

Special feature for dependencies:

▪    use ParentGuid to find out the key of the parent parameter selection: "[LLvar]AvABAAA".

▪    [optional] If parent parameter also has parent parameter; find its key of selection:"[LLVar]AvACAAA"".

▪    query dependent selections (RS API v1)

Here is an example of parameters retrieved:

Second depends on First.

Third depends on Second and therefore also on First.

As XML

<ArrayOfReportDataParameter xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <ReportDataParameter>

        <Guid>4CC0CF55-24CA-4C49-9ABF-6402996FDB82</Guid>

        <Name>First</Name>

        <HelpText />

        <IsVisible>false</IsVisible>

        <Choices>

            <Choice>

                <Key>[LLVar]AwABAAAA</Key>

                <Value>Beverages</Value>

                <IsSelected>true</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwACAAAA</Key>

                <Value>Condiments</Value>

                <IsSelected>false</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwADAAAA</Key>

                <Value>Confections</Value>

                <IsSelected>false</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwAEAAAA</Key>

                <Value>Dairy Products</Value>

                <IsSelected>false</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwAFAAAA</Key>

                <Value>Grains/Cereals</Value>

                <IsSelected>false</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwAGAAAA</Key>

                <Value>Meat/Poultry</Value>

                <IsSelected>false</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwAHAAAA</Key>

                <Value>Produce</Value>

                <IsSelected>false</IsSelected>

            </Choice>

            <Choice>

                <Key>[LLVar]AwAIAAAA</Key>

                <Value>Seafood</Value>

                <IsSelected>false</IsSelected>

            </Choice>

        </Choices>

        <SelectMultiple>false</SelectMultiple>

        <MayBeNull>false</MayBeNull>

        <MayBeEmpty>false</MayBeEmpty>

        <SourceMode>Database</SourceMode>

        <SourceType>Numeric</SourceType>

        <ControlType>Text</ControlType>

    </ReportDataParameter>

    <ReportDataParameter>

        <Guid>4EBF075B-CAF6-4961-B0DE-493DEE4CE108</Guid>

        <ParentGuid>4CC0CF55-24CA-4C49-9ABF-6402996FDB82</ParentGuid>

        <Name>Second</Name>

        <HelpText />

        <IsVisible>false</IsVisible>

        <Choices />

        <SelectMultiple>false</SelectMultiple>

        <MayBeNull>false</MayBeNull>

        <MayBeEmpty>false</MayBeEmpty>

        <SourceMode>Database</SourceMode>

        <SourceType>Numeric</SourceType>

        <ControlType>Text</ControlType>

    </ReportDataParameter>

    <ReportDataParameter>

        <Guid>028703D7-A7C1-4B67-84F5-37437F9CE4B8</Guid>

        <ParentGuid>4EBF075B-CAF6-4961-B0DE-493DEE4CE108</ParentGuid>

        <Name>Third</Name>

        <HelpText />

        <IsVisible>false</IsVisible>

        <Choices />

        <SelectMultiple>false</SelectMultiple>

        <MayBeNull>false</MayBeNull>

        <MayBeEmpty>false</MayBeEmpty>

        <SourceMode>Database</SourceMode>

        <SourceType>Numeric</SourceType>

        <ControlType>Text</ControlType>

    </ReportDataParameter>

</ArrayOfReportDataParameter>

As JSON

[

    {

        "Guid": "4CC0CF55-24CA-4C49-9ABF-6402996FDB82",

        "Name": "First",

        "HelpText": "",

        "IsVisible": false,

        "Choices": [

            {

                "Key": "[LLVar]AwABAAAA",

                "Value": "Beverages",

                "IsSelected": true

            },

            {

                "Key": "[LLVar]AwACAAAA",

                "Value": "Condiments",

                "IsSelected": false

            },

            {

                "Key": "[LLVar]AwADAAAA",

                "Value": "Confections",

                "IsSelected": false

            },

            {

                "Key": "[LLVar]AwAEAAAA",

                "Value": "Dairy Products",

                "IsSelected": false

            },

            {

                "Key": "[LLVar]AwAFAAAA",

                "Value": "Grains/Cereals",

                "IsSelected": false

            },

            {

                "Key": "[LLVar]AwAGAAAA",

                "Value": "Meat/Poultry",

                "IsSelected": false

            },

            {

                "Key": "[LLVar]AwAHAAAA",

                "Value": "Produce",

                "IsSelected": false

            },

            {

                "Key": "[LLVar]AwAIAAAA",

                "Value": "Seafood",

                "IsSelected": false

            }

        ],

        "SelectMultiple": false,

        "MayBeNull": false,

        "MayBeEmpty": false,

        "SourceMode": "Database",

        "SourceType": "Numeric",

        "ControlType": "Text"

    },

    {

        "Guid": "4EBF075B-CAF6-4961-B0DE-493DEE4CE108",

        "ParentGuid": "4CC0CF55-24CA-4C49-9ABF-6402996FDB82",

        "Name": "Second",

        "HelpText": "",

        "IsVisible": false,

        "Choices": [],

        "SelectMultiple": false,

        "MayBeNull": false,

        "MayBeEmpty": false,

        "SourceMode": "Database",

        "SourceType": "Numeric",

        "ControlType": "Text"

    },

    {

        "Guid": "028703D7-A7C1-4B67-84F5-37437F9CE4B8",

        "ParentGuid": "4EBF075B-CAF6-4961-B0DE-493DEE4CE108",

        "Name": "Third",

        "HelpText": "",

        "IsVisible": false,

        "Choices": [],

        "SelectMultiple": false,

        "MayBeNull": false,

        "MayBeEmpty": false,

        "SourceMode": "Database",

        "SourceType": "Numeric",

        "ControlType": "Text"

    }

]