Using links to answer prompts, display document layouts, and group data in a report or document

Once you have created a link to run a report or a document on the iPhone or iPad, you can add parameters to the URL to perform additional tasks, such as providing answers for prompts in the linked document, or specifying the layout to display when a document is run.

The table below lists the tasks you can perform, and the syntax for the link parameters to perform them. Link parameters are added to the end of a link URL. You can add more than one parameter to a link URL by separating each parameter with an ampersand (&). For example, the following URL contains parameters to display the first layout in a document and provide the answer to a Value prompt:

Main.aspx?evt=2048001&currentViewMedia=2&documentID=E8663E7A4D8CDF05C060129D0061692
&layoutIndex=0&valuePromptAnswers=1000

To create links to a report or document that is viewed on an iPhone, you must create the URL for each link manually, using the correct link syntax. Links created in the Link Editor are not supported in MicroStrategy Mobile for iPhone, except for links created in:

You can use links to do the following on the iPad:

Note: If you add a link to a text field, the user will only be able to open the link by selecting the link text on the iPhone or iPad. To create a link with a larger area that is easier to select, you can define a link that includes both the text and the area around it, or create an image button that users can select. To do this, you can:

The table below lists the tasks you can perform using link parameters, and the syntax required to perform them. Add each parameter to the end of the link URL, separating each parameter with an ampersand (&). For detailed information on these parameters, including examples, see the MicroStrategy Document Creation Guide.

Some of the tasks below require the ID of an attribute or attribute element, such as answering an Attribute Element List prompt. You can use data fields such as {AttributeName@GUID} to provide the ID automatically, or enter the ID in the URL manually. For example, the answer to a prompt in the source document is Northeast. The document contains a link that answers the same prompt in the linked document, using a data field to provide the ID of the attribute element. When the link is clicked on, the ID of the Northeast element is automatically provided.

Using data fields is convenient because the ID is automatically supplied when the link is clicked. However, manually entered IDs take less time to process. If you are providing the IDs of more than one attribute or attribute element, you must supply the IDs manually, since the data fields can only supply a single ID at a time. For steps to find the ID manually, see To obtain the ID of an object.

Task

Syntax

Run a report or document from a different project or server

server=servername&project=projectname&uid=username&pwd=password

Replace servername, projectname, username, and password with the name of the server, project, and the login name and password to use to log in.

By default, if the URL does not specify a server and project, the current server and project are used. You can specify these parameters, called session parameters, to execute a report or document in a different server or project, and provide the appropriate login name and password.

For more information on session parameters, see the Customizing MicroStrategy Web section, in Part I: Fundamentals of Customization in the Web Software Development Kit, available in the MicroStrategy Developer Library (MSDL), which is sold as part of the MicroStrategy SDK.

Display a report in grid or graph view

reportViewMode=view

Replace view with one of the following:

  •  

  • To display the report as a grid: 1

  • To display the report as a graph: 2

Display a specific layout in a document

layoutIndex=layout

Replace layout with the number of the layout you want to display. The first layout in the document is 0, the second is 1, and so on.

Specify the group-by element in a document

For an introduction to group-by, see About grouping and sorting data in a document.

groupByElements=groupByUnitID;groupByUnitType;groupByElementID

Replace the italicized variables with the following:

  •  

  • groupByUnitID: The ID of the group-by attribute or consolidation. You can use {&AttributeName@GUID}, to provide the ID automatically. Replace AttributeName with the name of the attribute or consolidation.

  • groupByUnitType: Use 12 for an attribute, or 47 for a consolidation.

  • groupByElementID: The ID of the group-by element. You can use {&AttributeName@LongElementID}, to provide the ID automatically. Replace AttributeName with the name of the attribute or consolidation.

You can specify multiple group-by elements by separating each set of group-by parameters with a caret (^), as follows:

groupByElements=groupByUnitID1;groupByUnitType1;groupByElementID1
^
groupByUnitID2;groupByUnitType2;groupByElementID2

Specify the page-by element in a report

For an introduction to page-by, see Grouping data by page: Page-by.

pageByElements=pageByUnitID;pageByUnitType;pageByElementID

Replace the italicized variables with the following:

  •  

  • pageByUnitID: The ID of the page-by attribute or consolidation. You can use {&AttributeName@GUID}, to provide the ID automatically. Replace AttributeName with the name of the attribute or consolidation.

  • pageByUnitType: Use 12 for an attribute, or 47 for a consolidation.

  • pageByElementID: The ID of the page-by attribute or consolidation. You can use {&AttributeName@LongElementID}, to provide the ID automatically. Replace AttributeName with the name of the attribute or consolidation.

You can specify multiple page-by elements by separating each set of page-by parameters with a caret (^), as follows:

pageByElements=pageByUnitID1;pageByUnitType1;pageByElementID1
^
pageByUnitID2;pageByUnitType2;pageByElementID2

Answer an Attribute Element List prompt

elementsPromptAnswers=AttributeID;AttributeElementID^AttributeDesc

Replace the italicized variables as follows:

  •  

  • AttributeID: The ID of the attribute.

  • AttributeElementID: The ID of the attribute element to use to answer the prompt. You can use {&AttributeName@ElementID} to provide the ID automatically. Replace AttributeName with the name of the attribute.

  • AttributeElementDesc: The description of the attribute. You can use {AttributeName@DESC} to provide the display name automatically. Replace AttributeName with the name of the attribute.

You can answer a prompt using multiple elements from the same attribute. To do so, you must supply the ID and display name of each attribute element to use to answer the prompt, separated by a semicolon, as below:

elementsPromptAnswers=AttributeID;AttributeElementID1^AttributeElementDesc1;
AttributeElementID2
^AttributeElementDesc2

You can provide answers to multiple attribute element prompts by separating each set of answers with a comma, as below:

elementsPromptAnswers={&Region@GUID};{&Region@ElementID}^{Region@Desc},
{&Year@GUID};{&Year@ElementID}^{Year@Desc}

Answer a Value prompt

valuePromptAnswers=value

Replace value with the answer for the Value prompt. This value can be a date, number, or text string.

You can answer multiple Value prompts by separating each answer with a caret (^), as follows:

valuePromptAnswers=1000^20^1/1/2010

To skip a Value prompt answer, use a caret, without anything else, as shown below:

valuePromptAnswers=^1/1/2010

Because of the convention for signifying unanswered prompts, you cannot answer a Value prompt with an empty string using a link URL.

Use all prompt answers from the source document, and apply them to the target report or document

promptsAnswerXML={&PROMPTXML}

The prompts in the linked report or document must be the same physical prompt objects with the same IDs as the prompts in the document containing the link. If the prompts are contained in filters, use links to filters instead of embedded filter prompts. For more information on links to filters, see the MicroStrategy Advanced Reporting Guide.

Reprompt the target report or document

(iPad only)

showprompts=1

 

To obtain the ID of an object

Prerequisite

  1. Navigate to the folder location of the object.

  2. Right-click the object, then select Properties. The Properties dialog box is displayed, with the object's ID displayed in the ID field. You can highlight and copy this ID to use in a link URL.

To obtain the ID of a specific attribute element in a document

Prerequisite

  1. To obtain the ID of a specific element in an attribute, you must first obtain the ID of the attribute. Navigate to the folder location of the attribute.

  2. Right-click the attribute, then select Properties. The Properties dialog box is displayed, with the attribute's ID displayed in the ID field.

  3. Highlight the ID, then press CTRL+C to copy it to the clipboard.

  4. Open the document that contains the attribute in Editable Mode.

  5. Right-click the header of the attribute in the Grid/Graph, then point to Attribute Forms, and select ID. The ID of each element in the attribute is displayed.

  6. The full attribute element ID is the ID of the element's attribute, followed by a colon (:) and the ID of the element displayed in the grid. For example:

    8D679D4B11D3E4981000E787EC6DE8A4:2

Related topic