MicroStrategy ONE

Link to a prompted report using prompt XML

Before you begin

This is an example of creating manual link URLs to link reports and documents. A link is a connection in a document to another document, a report, or a web page. A link lets an analyst execute another document or report (the target) from a document (the source), and to pass parameters to answer any prompts that are in the target. For basic information on link URLs created manually, see Creating link URLs manually; for an introduction to this example, including prerequisites, see Examples of link URLs created manually.

Prompt XML represents prompt answers in an XML format, incorporating dynamic information from the executed source document into the XML string. In this example, both the source document and the target report are almost identical to the message ID example. Both the prompt XML and the message ID pass the parameters of the source document to the target report; one difference is that message ID requires that the Web session remains open while prompt XML does not.

The following sample is the source document. The prompts have been answered to supply revenue data from a single year for the Books category only, but across all regions.

Source document: Region, Forecast, Revenue, and link to a more detailed report

The link at the bottom of the document executes a prompted report. However, when the link is clicked, no prompts are displayed because all the prompt answers are contained in the link. The following sample does not display the complete report, but allows you to verify that the totals agree and that only Books have been included in the report.

Target document: Region, Category, Q1 02 Revenue & Forecast, Totals

To create the source document

  1. Copy the Example 2: Document Drilling document, created in Link to a prompted report using the message ID. Rename the copy Example 4: Document Drilling.

  2. Open Example 4: Document Drilling in the Document Editor.

  3. Delete the "Click here" text field in the Document Footer to remove the previous link.

To create a link with prompt XML

  1. In the Document Footer, add the following static text field:

    Click here for a detailed report.

  2. Right-click the control created in step 1 and select Properties.

  3. On the General tab, select the Is hyperlink check box.

  4. Type the following in the Hyperlink box, replacing reportID with the report ID of the Revenue vs. Forecast (subtotals) report:

    • http://localhost/MicroStrategy/asp/Main.aspx?evt=4001&reportID=reportID&promptsAnswerXML={&PROMPTXML}

    • The auto text code {&PROMPTXML} generates the appropriate XML string when the link is clicked.

  5. Click OK.

  6. Save and close the document.

To get the results displayed in the screen shots, run the document in Web, selecting the following prompt answers:

  • Quarter: four quarters of any year

  • Category: Books

  • Region: All regions

Click the link at the bottom of the document to execute the report.

Related Topics