MicroStrategy ONE

Building a URL with multiple events

Every request to MicroStrategy Web corresponds to at least one event, or action. URLs typically include only one event, but in some instances, you may want a single URL to cause the execution of multiple events. In such cases, in addition to the parameters required for each separate event (including a src and evt parameter), you add an evtorder parameter that makes it possible to call, or stack, multiple events in a specified order.

In this scenario, you build two URLs that execute multiple events. These customizations include:

In each case, the URL that you build consists of the root URL for the environment in which you are operating (J2EE or .NET), the parameters that define each separate event, and the parameter that specifies the order in which the events, or actions, should take place. The root URL is separated from the list of parameters with a "?" character, and the individual parameter name/value pairs are separated from one another with a "&" character. If a new session must be established, you must also add the parameters required for connecting to MicroStrategy Intelligence Server and accessing the appropriate MicroStrategy project. See Executing Multiple Events Using the URL API for a more detailed explanation.

Building a URL that executes a report and then opens the History List

This customization assumes that MicroStrategy Web has been configured to save all reports to the History List. As a result, the report executed by the URL appears in the History List when it is opened.  ClosedClick here for instructions on how to do this.

  1. Log in to MicroStrategy Web as a user with administrative privileges.  

  2. Click the Preferences link on the toolbar at the top.  

  3. In the left pane, under Preferences Level, click Project Defaults.  

  4. In  the left pane, under Preferences, click History List.  

  5. At the top of the right pane, under Add reports and documents to my History List, select Automatically.  

  6. At the bottom of the right pane, click Apply.

To build this custom URL:

  1. Create the appropriate root URL.

    J2EE environment

    http://webserver/MicroStrategy/servlet/mstrWeb

    .NET environment

    http://webserver/MicroStrategy/asp/Main.aspx

    where webserver is the name of the machine where MicroStrategy Web is installed.
     

  2. If a new session must be created, add the required URL parameters to specify the project, Intelligence Server and port to use.  

    ?Project=MicroStrategy+Tutorial&Server=IServer&port=0

    where IServer is the name of the machine where Intelligence Server is installed.

 

  1. Add the URL parameters for the event that executes a specified report in grid view.

    J2EE environment

    &evt=4001&src=mstrWeb.report.4001&reportID=EB3CD5D14F4C8C77782AC0882C986B8D&reportViewMode=1

    .NET environment

    &evt=4001&src=Main.aspx.report.4001&reportID=EB3CD5D14F4C8C77782AC0882C986B8D&reportViewMode=1

    where evt=4001 specifies the report execution event and reportViewMode=1 specifies that the report should be executed in grid mode. The specific report to be executed is identified by its GUID (Global Unique Identifier), which is set as the value of reportID . Use the GUID for the report that you want to execute.
     

  2. Add the URL parameters for the event that opens the History List page.

    J2EE environment

    &evt=3018&src=mstrWeb.3018

    .NET environment

    &evt=3018&src=Main.aspx.3018

    where  evt=3018 specifies the History List event on the report grid bean.
     

  3. Add the evtorder parameter to specify the order in which the two events should be called.

    evtorder=4001,3018

    In this scenario, the report should be executed first (evt=4001), followed by the action that opens the History List (evt=3018).The event IDs (that are the value of the evtorder parameter) must be separated from one another by commas.

Most browsers will correctly interpret the comma as a separator between the event IDs. However, the safest approach is to use the encoded comma value—%2c— as a separator, although it is more difficult to read. Using encoded comma values, the parameter would look as follows:evtorder=40012%c4096010

  1. The final step is to use the value of each event as a parameter, which is set to the value of 1. You append these two final parameters to the URL.
     

&4001=1&3018=1

 

Adding these two parameters to the URL informs the MicroStrategy Web application that each of these events needs to be triggered (that is, executed by the MicroStrategy Web component that handles the action).

 

Once you have performed the steps listed above, the final URL should look as follows:

 

J2EE environment
http://webserver/MicroStrategy/servlet/mstrWeb?Project=MicroStrategy+Tutorial&Server=IServer&port=0

&evt=4001&src=mstrWeb.report.4001&reportID=EB3CD5D14F4C8C77782AC0882C986B8D&reportViewMode=1

&evt=3018&src=mstrWeb.3018&evtorder=4001,3018&4001=1&3018=1

 

.NET environment
http://webserver/MicroStrategy/asp/Main.aspx?Project=MicroStrategy+Tutorial&Server=IServer&port=0

&evt=4001&src=Main.aspx.report.4001&reportID=EB3CD5D14F4C8C77782AC0882C986B8D&reportViewMode=1

&evt=3018&src=Main.aspx.3018&evtorder=4001,3018&4001=1&3018=1

where webserver is the name of the machine where MicroStrategy Web is installed and IServer is the name of the machine where Intelligence Server is installed.

When MicroStrategy Web encounters this URL, it runs the specified report and immediately opens the History List page. Because MicroStrategy Web has been configured to save all reports to the History List, the History List page that is displayed to the user includes the report that was just run.

You may be asked to enter your user credentials on the log in screen if you have not previously logged in.

Building a URL that executes a prompted report and then drills on an element within that report

To build this custom URL:

 

  1. Create the appropriate root URL.

    J2EE environment

    http://webserver/MicroStrategy/servlet/mstrWeb

    .NET environment

    http://webserver/MicroStrategy/asp/Main.aspx

    where webserver is the name of the machine where MicroStrategy Web is installed.
     

  2. If a new session must be created, add the required URL parameters to specify the project, Intelligence Server, and port to use.  

    ?Project=MicroStrategy+Tutorial&Server=IServer&port=0

    where IServer is the name of the machine where Intelligence Server is installed.

 

  1. Add the URL parameters for the event that executes a prompted report in grid view.

    J2EE environment

    &evt=4001&src=mstrWeb.report.4001&reportID=0BA6017811D5EFDF100080B3A5E8F8A4 &elementsPromptAnswers=8D679D4B11D3E4981000E787EC6DE8A4;8D679D4B11D3E4981000E787EC6DE8A4:1,8D679D3711D3E4981000E787EC6DE8A4;8D679D3711D3E4981000E787EC6DE8A4:1&reportViewMode=1

    .NET environment
    &evt=4001&src=Main.aspx.report.4001&reportID=0BA6017811D5EFDF100080B3A5E8F8A4 &elementsPromptAnswers=8D679D4B11D3E4981000E787EC6DE8A4;8D679D4B11D3E4981000E787EC6DE8A4:1,8D679D3711D3E4981000E787EC6DE8A4;8D679D3711D3E4981000E787EC6DE8A:1&reportViewMode=1

    where evt=4010 specifies the report execution event and reportViewMode=1 specifies that the report should be executed in grid mode. The specific report to be executed (reportID) is identified by its GUID (Global Unique Identifier), and the prompt answers required to run the report (elementsPromptAnswers) are identified by their GUIDs. Because the specified report has multiple prompts, the prompt answers are separated by commas and semi-colons.  You should use the GUID for the prompted report that you want to execute.
     

  2. Add the URL parameters for the event that performs a drill on an element in the report grid.

    J2EE environment

    &evt=4096010&src=mstrWeb.report.frame.rb.vb.4096010&elementList=1A3A0&drillPathKey=0.82.1.3.1&retainParent=1&retainThresh=1

    .NET environment

    &evt=4096010&src=Main.aspx.report.frame.rb.vb.4096010&elementList=1A3A0&drillPathKey=0.82.1.3.1&retainParent=1&retainThresh=1

    where  evt=4096010 specifies the drilling event on the report grid view bean and "vb" in the src parameter is the "implicit child" ViewBean associated with the ReportBean grid view. The elementList=1A3A0 identifies the report element on which to drill. The drillPathKey=0.82.1.3.1 identifies the drill path to use. The retainParent=1 specifies that the parent should be retained, and the retainThresh=1 specifies that the threshold should be retained.

    Implicit child beans are created programmatically by the parent bean implementation class. Report and report writer beans can have prompt and view beans as implicit children; document beans can have prompt beans as implicit children.  

  3. Add the evtorder parameter to specify the order in which the two events should be called.

    &evtorder=4001,4096010

    In this scenario, the report should be executed first (evt=4001), followed by the drill action (evt=4096010). The event IDs (that are the value of the evtorder parameter) must be separated from one another by commas.
     

Most browsers will correctly interpret the comma as a separator between the event IDs. However, the safest approach is to use the encoded comma value—%2c—as a separator, although it is more difficult to read. Using encoded comma values, the parameter would look as follows: evtorder=40012%c4096010

 

  1. The final step is to use the value of each event as a parameter, which is set to the value of "1". You append these two final parameters to the URL:

    &4001=1&4096010=1

Adding these two parameters to the URL informs the MicroStrategy Web application that each of these events needs to be triggered (that is, executed by the MicroStrategy Web component that handles the action).Once you have performed the steps listed above, the final URL should look as follows:

J2EE environment:
http://webserver/MicroStrategy/servlet/mstrWeb?Project=MicroStrategy+Tutorial&Server=IServer&port=0

&evt=4001&src=mstrWeb.report.4001&reportID=0BA6017811D5EFDF100080B3A5E8F8A4

&elementsPromptAnswers=8D679D4B11D3E4981000E787EC6DE8A4;8D679D4B11D3E4981000E787EC6DE8A4:2,8D679D3711D3E4981000E787EC6DE8A4;8D679D3711D3E4981000E787EC6DE8A4:1

&reportViewMode=1&evt=4096010&src=mstrWeb.report.frame.rb.vb.4096010&elementList=1A3A0&drillPathKey=0.82.1.3.1

&retainParent=1&retainThresh=1&displayMode=1&evtorder=4001,4096010&4001=1&4096010=1

.NET environment:
http://webserver/MicroStrategy/asp/Main.aspx?Project=MicroStrategy+Tutorial&Server=IServer&port=0

&evt=4001&src=Main.aspx.report.4001&reportID=0BA6017811D5EFDF100080B3A5E8F8A4

&elementsPromptAnswers=8D679D4B11D3E4981000E787EC6DE8A4;8D679D4B11D3E4981000E787EC6DE8A4:1,8D679D3711D3E4981000E787EC6DE8A4;8D679D3711D3E4981000E787EC6DE8A4:1

&reportViewMode=1&evt=4096010&src=Main.aspx.report.frame.rb.vb.4096010&elementList=1A3A0&drillPathKey=0.82.1.3.1 &retainParent=1&retainThresh=1&evtorder=4001,4096010&4001=1&4096010=1

where webserver is the name of the machine where MicroStrategy Web is installed and IServer is the name of the machine where Intelligence Server resides.

When MicroStrategy Web encounters this URL, it runs the "Sales by Region" report, using the prompt answers supplied ("Northeast" for region and "Books" for category), and immediately drills on the specified element (the "Art & Architecture" subcategory of "Books"). The page that is displayed to the user contains the results of the drilling action, not the report.

You may be asked to enter your user credentials on the log in screen if you have not previously logged in.