Strategy ONE
Executing a Document Using the URL API
The table below shows the URL parameters used to execute a document using the URL API.
Argument |
Description |
---|---|
evt |
2048001 - executeRWDocument Executes the report services document specified by the documentID argument |
src |
Page component that should handle the action and the event |
documentID |
ID of the report services document to execute |
currentViewMedia | Mode in which the document will be viewed. The value comes from EnumDSSXMLViewMedia. The recommended value is "1" for Presentation Mode (previously referred to as Express Mode). If no value is specified, the view mode attached to the object will be used. |
execFlags* |
Flags to be used while executing a document |
messageID* |
ID of an in-memory report services document. If present, the report services document is fetched from memory rather than executed |
* optional parameters
The sample URL shown below illustrates how to execute the "Inventory by Subcategory" document, which is part of the MicroStrategy Tutorial project.
J2EE environment:
http://webserver/MicroStrategy/servlet/mstrWeb?
Server=localhost
&Project=MicroStrategy+Tutorial
&Port=0
&uid=Administrator
&pwd=
&src=mstrWeb.2048001
&evt=2048001
&documentID=41B1166B4C84A759CC2C19BB07C2EC00
.NET environment:
http://webserver/MicroStrategy/asp/Main.aspx?
Server=localhost
&Project=MicroStrategy+Tutorial
&Port=0
&uid=Administrator
&pwd=
&src=Main.aspx.2048001
&evt=2048001
&documentID=41B1166B4C84A759CC2C19BB07C2EC00
Executing multiple events
You can use multiple events to add additional actions when you execute a document. For example, if you want to execute a document with a specified group-by attribute element selected, you first call the event to execute the document (2048001) and then call the event to specify the group-by element (2048029). For the first event you specify the document ID, and for the second event you specify the element ID for the group-by element. Use the syntax for multiple events to execute both events in the correct order. Sample URLs are provided below to illustrate how to do this. An explanation of how to find the value for the group-by element is provided after the sample URLs.
The value for the group-by element used to be a short value, like "F48", but it is now a GUID, like "F16EF61743BEC4846AA210D6A518E2247".
J2EE environment:
http://webserver/MicroStrategy/servlet/mstrWeb?
Server=localhost
&Project=MicroStrategy+Tutorial
&Port=0
&uid=Administrator
&pwd=
&evt=2048001
&src=mstrWeb.2048001
&documentID=23BB260D439B65D405F0A194C7907DFF
¤tViewMedia=1
evt=2048029
&src=mstrWeb.oivm.rwb.2048029
&elementID=h2%3B8D679D3711D3E4981000E787EC6DE8A4
&gkey=F16EF61743BEC4846AA210D6A518E2247
&evtorder=2048001%2c2048029
&2048029=1
&2048001=1
.NET environment:
http://webserver/MicroStrategy/asp/Main.aspx?
Server=localhost
&Project=MicroStrategy+Tutorial
&Port=0
&uid=Administrator
&pwd=
&evt=2048001
&src=Main.aspx.2048001
&documentID=23BB260D439B65D405F0A194C7907DFF
¤tViewMedia=1
&evt=2048029
&src=Main.aspx.oivm.rwb.2048029
&elementID=h2%3B8D679D3711D3E4981000E787EC6DE8A4
&gkey=F16EF61743BEC4846AA210D6A518E2247
&evtorder=2048001%2c2048029
&2048029=1
&2048001=1
Finding the value for the group-by element
To specify the group-by element in a document, you use the gkey parameter in the URL. To find the value for this parameter, do the following:
- In MicroStrategy Web, open the document in Design mode.
-
Use developer tools to view the HTML so that you can find the element ID for the group-by element.
The element ID for the group-by key is the value of dpt. In this example, the URL would look like this:
http://webserver/MicroStrategy/servlet/mstrWeb?
Server=localhost
&Project=MicroStrategy+Tutorial
&Port=0
&uid=Administrator
&pwd=
&evt=2048001
&src=mstrWeb.2048001
&documentID=2D7E3B36478319FA637EF5A50AAA868D
¤tViewMedia=1
evt=2048029
&src=mstrWeb.oivm.rwb.2048029
&elementID=h7%3B8D679D3811D3E4981000E787EC6DE8A4
&gkey=F16EF61743BEC4846AA210D6A518E2247
&evtorder=2048001%2c2048029
&2048029=1
&2048001=1
See also: