In Strategy Mobile 9.4.1 - 10.x, it is possible to use URL API to pass default selector answers to the target document even if the source document contains no selectors.
Syntax:
Parameter | Description |
evt | 2048001 – executeRWDocument. Executes the report services document specified by the documentID argument. |
src | The page component that should handle the action and the event |
documentID | Specifies the ID of the report services document to execute |
selections | Specifies whether to pass the selector answer using matching Attribute ID’s or Selector Names in the source and target document |
selectorMode | Specifies the type of method used for passing the selector answers |
There are two ways to match selectors using this URL API:
- Match by Attribute ID
- Match by Selector Name
The following elements are required by any of the selector modes:
mstrWeb?
evt=2048001
&src=mstrWeb.2048001
&visMode=0
&documentID=20ECD0C34CD24C15AFA82184C56B0272
¤tViewMedia=2
Note: Strategy Mobile 9.3.1 and later supports multiple attributes and attribute elements ID’s.
To pass selector answers that matches by the attribute’s ID append the following:
&selections=AttrID1:ElementID1,ElementID2;AttrID2:ElementID3,ElementID4...
&selectorMode=1
Note that:
- AttrID# is the GUID of the attribute used in the selectors to be matched in the source and target document.
- ElementID# is the ID of the attribute element to be selected in the target document’s selector. Usually ordered from 0 to the number of attribute elements. Refer to KB32345 "List of available auto text macros in Report Services Documents" for obtaining the attribute GUID and ElementID.
- selectorMode=1 is to match by the source and target document’s attribute’s ID. Refer to KB44088 "How to pass multiple attribute selector values to a target document with the same attribute selectors using URL API in Strategy Web 9.3.1." for more information.
- When passing the attribute ID, the URL should always be followed by selectorMode=1
- Use "comma" to add one or more attribute elements for an attribute
- Use "semi-colon" to add one or more attributes
- Use "colon" between the Attribute GUID and the first Element ID
An example for the complete syntax is:
+J2EE:
mstrWeb?
evt=2048001
&src=mstrWeb.2048001
&visMode=0
&documentID=20ECD0C34CD24C15AFA82184C56B0272
¤tViewMedia=2
&selections=8D679D4B11D3E4981000E787EC6DE8A4:8D679D4B11D3E4981000E787EC6DE8A4:4,8D679D4B11D3E4981000E787EC6DE8A4:3
;8D679D3811D3E4981000E787EC6DE8A4:8D679D3811D3E4981000E787EC6DE8A4:1,8D679D3811D3E4981000E787EC6DE8A4:7
&selectorMode=1
+ASP.NET:
Main.aspx?
evt=2048001
&src=Main.aspx.2048001
&visMode=0
&documentID=20ECD0C34CD24C15AFA82184C56B0272
¤tViewMedia=2
&selections=8D679D4B11D3E4981000E787EC6DE8A4:8D679D4B11D3E4981000E787EC6DE8A4:4,8D679D4B11D3E4981000E787EC6DE8A4:3
;8D679D3811D3E4981000E787EC6DE8A4:8D679D3811D3E4981000E787EC6DE8A4:1,8D679D3811D3E4981000E787EC6DE8A4:7
&selectorMode=1
To pass selector answers that matches by the selector’s name append the following:
&selections=selectorName1:ElementID1,ElementID2;selectorName2:ElementID3,ElementID4...
&selectorMode=2
Note that:
- selectorName# is the name of the attribute selector which should be the same in both the source and target document
- ElementID# is the ID of the attribute element to be selected in the target document’s selector. Usually ordered from 0 to the number of attribute elements. Refer to KB32345 "List of available auto text macros in Report Services Documents" for obtaining the attribute GUID and ElementID.
- selectorMode=2 is to match by the source and target document’s selector’s name. Refer to KB44088 "How to pass multiple attribute selector values to a target document with the same attribute selectors using URL API in Strategy Web 9.3.1." for more information.
- When passing the selector’s name, the URL should always be followed by selectorMode=2
- Use "comma" to add more attribute elements for an attribute
- Use "semi-colon" to add one or more selectors
- Use "colon" between the Selector Name and the first Element ID
An example for the complete syntax is:
+J2EE:
mstrWeb?
evt=2048001
&src=mstrWeb.2048001
&visMode=0
&documentID=20ECD0C34CD24C15AFA82184C56B0272
¤tViewMedia=2
&selections=RegionSelector:8D679D4B11D3E4981000E787EC6DE8A4:4,8D679D4B11D3E4981000E787EC6DE8A4:1
,8D679D4B11D3E4981000E787EC6DE8A4:3;CategorySelector:8D679D3811D3E4981000E787EC6DE8A4:1
&selectorMode=2
+ASP.NET:
Main.aspx?
evt=2048001
&src=Main.aspx.2048001
&visMode=0
&documentID=20ECD0C34CD24C15AFA82184C56B0272
¤tViewMedia=2
&selections=RegionSelector:8D679D4B11D3E4981000E787EC6DE8A4:4,8D679D4B11D3E4981000E787EC6DE8A4:1
,8D679D4B11D3E4981000E787EC6DE8A4:3;CategorySelector:8D679D3811D3E4981000E787EC6DE8A4:1
&selectorMode=2
Currently this syntax is only supported in Strategy Mobile. An enhancement request has been logged to support this same syntax in Strategy Web. Contact MictoStrategy Technical Support for more information on this enhancement request.
To achieve the same behavior in Strategy Web 9.x with a different syntax refer to
KB39871 How to construct URL API to run a Report Services document with different default selection for attribute element selector in MicroStrategy Web 9.x? 49585