Export to PDF :
Users are able to export the current document to PDF with the currently selected panels using the toolbar export to PDF icon.
If the toolbar is not available to end users the following methods can be used to export the document to PDF with the current panel selections using an object on the document template:
1. Express View Mode
The following URL API syntax can be used to export the current document including the currently selected panels in Express View mode:
ASPx:
Main.aspx?evt=3069&src=Main.aspx.3069&executionMode=3&messageID={&DOCUMENTMESSAGEID}
JSP:
mstrWeb?evt=3069&src=mstrWeb.3069&executionMode=3&messageID={&DOCUMENTMESSAGEID}
Create a textbox or image and enable the hyperlink property to implement the link URL above.
2. Interactive View Mode
Interactive View Mode works different from Express View Mode for which reason the above URL API cannot be applied. In order to achieve the same behavior it is required to trigger the export using Javascript as shown below:
a. Insert a HTML container
b. Insert the following JavaScript syntax:
<html> <head> <script language="JavaScript"> <!-- function myFunction() { if(typeof microstrategy!=="undefined"){microstrategy.getViewerBone().commands.exec("export", "3");}else{alert('This action is not supported in the current view mode');}; } //--> </script> </head> <body> <a href="javascript:myFunction()">Export</a> </body> </html>
c. When running the document in Interactive View Mode, the HTML container shows a link "Export" that, as soon as it is clicked, triggers the export to PDF with currently selected panels.
Print :
MicroStrategy Web 9.4.1 users can create a URL API link that opens the Print Options for a specific report. This will show the options below for MicroStrategy Web 9.4.1:
After clicking on "Show Printable Version" users will be able to obtain the PDF version of a report ready to print.
How to construct a URL API to open the print options for a report
The following parameters are needed to construct this URL API link:
mstrWeb?
&src=mstrWeb.3053
&evt=3053
&pdfPrint=1
&reportViewMode=1
&reportID=XXXXXXXXXXXXXXXXX
The parameter pdfPrint will open the Print Version of the PDF export options. If this parameter is not included, the normal PDF Export options will be displayed.
Alternatively, the following parameter can be added to the URL to skip the options page and export directly:
&showOptionsPage=false
Examples
ASP.NET environment:
Main.aspx?&src=Main.aspx.3053&evt=3053&pdfPrint=1&reportViewMode=1&reportID=CEF3C2B64463B7202F49AF81FCA9BE35
J2EE environment:
mstrWeb?&src=mstrWeb.3053&evt=3053&pdfPrint=1&reportViewMode=1&reportID=CEF3C2B64463B7202F49AF81FCA9BE35
Send E-Mail:
MicroStrategy Web 9.4.1 developers can use the Send Now functionality to immediately distribute a document using several channels by clicking on the button below:
This button will expose the Send Now page where users can pick the channel, format and other configurations for this delivery as shown below:
MicroStrategy Web 9.4.1 developers can build a URL API link to access this page as described below.
How to build a URL API link to access the Send Now configuration page
To build the URL API link to access the Send Now page for a Report Services Document the following parameters with the following values are required:
Main.aspx? evt=3037 &objectType=55 &objectSubType=14081
Depending on the scenario where the URL API is going to be used, developers can either specify the document using the message ID or thedocument ID. The message ID will normally be used when the link is included in the document that wants to be used for Send Now. The document ID will be used generally when the link will trigger the feature from a different document.
According to the description above append one of the following:
For scenario 1 using message ID:
&messageID={&DOCUMENTMESSAGEID}
For scenario 2 using document ID:
&objectID=XXXXXXXXXXX
Note: in the scenario above objectID has to be equal to the ID of the document.
Examples
In an ASP environment the URL API will look similar to the following:
For scenario 1 using message ID:
Main.aspx? evt=3037 &objectType=55 &objectSubType=14081 &messageID={&DOCUMENTMESSAGEID}
For scenario 2 using document ID:
Main.aspx?
evt=3037
&objectType=55
&objectSubType=14081
&objectID=90760F0547C774CF0E45D8AC15FC8849
In a J2EE environment the URL API will look similar to:
For scenario 1 using message ID:
mstrWeb? evt=3037 &objectType=55 &objectSubType=14081 &messageID={&DOCUMENTMESSAGEID}
For scenario 2 using document ID:
mstrWeb?
evt=3037
&objectType=55
&objectSubType=14081
&objectID=90760F0547C774CF0E45D8AC15FC8849
Note: The URL API links above are for Report Services Documents only.
Displaying report in different views:
The URL parameter reportviewmode determines how reports are displayed in the view mode through the URL API in MicroStrategy Web 9.x. The following examples illustrate the URL parameter reportviewmode and the corresponding view of the report that will display:
When reportviewmode is set to 1, the report is displayed in grid mode:
When reportviewmode is set to 2, the report is displayed in graph mode:
When reportviewmode is set to 3, the report is displayed in grid/graph mode:
Code Customization:
WARNING:
This customization is provided as a convenience to MicroStrategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, MicroStrategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, MicroStrategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, MicroStrategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about MicroStrategy Consulting assistance.