Tuesday 15 November 2016

Different URL APIs in Microstrategy

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&colon;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.




Friday 11 November 2016

Commonly Used VLDB Properties

In this post I am going to discuss the most important and commonly used VLDB properties available in Microstrategy.

Before going into details let's first understand what VLDB properties are exactly. The name stands for Very Large Database properties. But don't take the name very seriously because VLDB properties can do lot of things irrespective of database size. Basically these are settings to tweak and fine tune the behavior of Microstrategy. It can control how different engines will work, can do database specific settings to improve performance.


Analytical Engine :

  1. Display NULL on Top : This property determines where NULL values are displayed when data is sorted.  
        Possible Values: - Display Null Values in bottom while sorting
                                     - Display Null Values on top while sorting

         It can be set at Project, Report, Template level

         Default Value:Display NULL values on top while sorting.


    2. Evaluation Ordering : Determines the order in which Analytical Engine                   performs different kinds of calculations.

         Possible Values: - 6.x evaluation order
                                    - 7.x evaluation order


         It can be set at Project, Report, Template level

         Default Value: - 6.x evaluation order.


    3.  Null checking for Analytical Engine : Determines whether or not NULL is            interpreted as the number 0 when the Analytical Engine does calculations.

         Possible Values: - True
                                    - False

         It can be set at Project, Report, Template, Metric level

         Default Value: - True

   4.  Subtotal Dimensionality Aware : Determines if subtotals are dimensionality         aware or not.

         Possible Values: - True
                                    - False

         It can be set at Project, Report, Template, Metric level

         Default Value: - True

Governing :

    5. Intermediate Row limit : Controls the maximum number of rows returned to the Intelligence Server for an intermediate pass.

        Possible Values: User Defined. 
                                   0 = no limit on number of rows returned

         It can be set at Report level

         Default Value: -1

To be continued ..

Wednesday 9 November 2016

Microstrategy Desktop becomes completely free - What does it mean?


Recently Microstrategy has announced that it's Desktop tool becomes completely free for everyone. While the desktop tool is not totally new, many of the existing users are confused after the announcement came. So the questions are like -

  • Is it really free for ever? 
  • Is it fully functional?
  • What are the limitations?
  • What should I do as an existing licensed user?
  • Why it's free at the first place?

Yes it's free forever and for everyone without any restrictions. It's fully functional and a great tool.

As far as limitations compared to MSTR WEB;

Going on the assumption that the desktop user is not a licensed MSTR Web user:

1. They do not have access to any MSTR web objects like existing reports as data sources
2. The security model is not available so row level security is not there.
3. Direct Access to managed data sets. Every user will need to manage their own data set. in WEB all of the connection information that I will typically use(database connections) are managed by the Administrator.  so If I want to connect to a DB2 database that is not part of the prescribed list of databases. That connection is already managed by the administrator. VLDB setting are also managed by the Administrators so I know unsupported databases can still be optimized .  if I had to do it in desktop, connecting to a version of an unsupported database is not easy.

So if you are ok with these things you can always use the desktop instead of web. There are number of advantages if you work on desktop if it suits your needs.

And why it's free? It's simply to tackle the competition. All other newer players have introduced similar applications for free.


Wednesday 19 October 2016

Dropdown selectors with multi-select checkboxes

This is a very common requirement from the users but unfortunately this feature is not available in Microstrategy till version 10.2. As this was a critical requirement for the business we tried different ways to implement this with the help of some workarounds. Finally one particular implementation was very similar to the actual requirement and the client also liked the idea.  Steps are as follows

1.         Create a simple textbox and named it after the required filter field.

2.         Create a panel stack and marked it as information window. Information window is an in-built functionality in MSTR. It’s exactly like normal panel stack but it’s not visible by default. We have to target this information window from some other object like textbox, grid, graph etc so that when user clicks the object the panel stack appears as a pop-up.

3.         Add the required checkbox filter inside the information window.

4.         Target the information window from the text box created in step 1.

Now when the user clicks on the filter text box a popup appears containing the multi select checkbox filter.

We can also utilize the additional space we got in the pop-up by adding multiple related filters in it. 

Your request could not be processed due to a server error" occurs while adding recipients to an e-mail subscription in MicroStrategy Web 10.x

In MicroStrategy Web 10.x, users may get an error message while creating or editing email subscriptions.  This document explains a possible cause of this issue and how it can be resolved.

Email Subscription.png

This is a known issue in MicroStrategy 10.x.  The issue occurs because there are contacts referencing users who have been deleted from the metadata.  When a user presses the To button, an Access Control List (ACL) check is run to get the possible contacts.  Contacts inherit their ACL from the user they are linked to, so since the user associated with the contact has been deleted, the ACL check fails

Deleting the invalid contacts will resolve the issue.  If assistance is needed in identifying the invalid contacts, please contact MicroStrategy Technical Support.

Monday 16 May 2016

Search Box Selector is not getting filtered by any other selector

Hi Everyone,

The searchbox selector was recently introduced in Microstrategy in it's 9.3 upgrade. No doubt it's a very welcome feature which can come handy for many cases. But the selector had one major flaw in it till 10.3 was released. The issue is when you target a search selector by any other selector, the list of values that appear in the searchbox doesn't get filtered, it shows all the elements that are present in the that field.

The issue was recently fixed in 10.3 though this is missing the release note.

What should I do in the older versions?

Only thing you can do is to uncheck the 'Search on Server' checkboax which you have in the Selector Properties-> Layout. This should resolve your problem.





Thank you

Wednesday 4 May 2016

Pass prompt answers dynamically to different kinds of prompts e.g. Element prompt, Hierarchy prompt

There are cases where you need to pass some values dynamically from a dashboard or a normal web page to a target dashboard. The prompt(s) present in the target dashboard should be automatically answered while navigating from the source. To achieve this what we can modify the URL of the target dashboard which will contain the required answers along with the specific parameters for the target prompts. Now there could be different kind of prompts like

1. Attribute element prompt
2. Value prompt
3. Hierarchy prompt

The URL must be crafted according to the type of target prompt. I will discuss the structure of each URL needed for the above mentioned prompts


Attribute Element Prompt:
            This is the most common scenario. The structure of the URL should be something like the following one

http://mstra/MicroStrategy/asp/Main.aspx?evt=2048001&src=Main.aspx.2048001&visMode=0&currentViewMedia=8&documentID=9FDF2E62433EA047A48E2CA5A058C0F3&server=XXXX&Project=YYYY&port=0&share=1&elementPromptAnswers=074819

To build this URL do the following
1. Get the actual link of the dashboard
2. Append the highlighted part
3. The value mentioned in the last is the value which you want to pass

Value Prompt:
             This is similar the element prompt. Follow the same thing to get the following URL

http://mstra/MicroStrategy/asp/Main.aspx?evt=2048001&src=Main.aspx.2048001&visMode=0&currentViewMedia=8&documentID=9FDF2E62433EA047A48E2CA5A058C0F3&server=XXXX&Project=YYYY&port=0&share=1&valuePromptAnswers=074819

Hierarchy Prompt:
              This is a very rare scenario but we can still answer it dynamically.

1. Add the prompted report in a blank document
2. In the body of the document, add the following autotext {&PROMPTXML}
3. This autotext will generate the required text that is required in the URL
4. Run the document and copy the XML

The XML will look like following

<rsl><pa pt="8" pin="0" did="1965EB7842BD4B37D56AD69F58386662" tp="10"><exp><nd et="5" nt="4" dmt="1" ddt="-1"><nd et="1" nt="5" dmt="1" ddt="-1"><at did="650A0FA446E9F26CE7B66AA1F81965A7" tp="12"/></nd><nd et="1" nt="2" dmt="1" ddt="-1"><mi><es><at did="650A0FA446E9F26CE7B66AA1F81965A7" tp="12"/><e emt="1" ei="650A0FA446E9F26CE7B66AA1F81965A7:123055432"/></es></mi></nd><op fnt="22"/></nd></exp></pa></rsl>

ID of the Hierarchy on which the prompt is built
ID of the Attribute which is selected by the user while answering the prompt.
Value of the prompt


The final URL will be

http://WBSERVER/MicroStrategy/asp/Main.aspx?evt=2048001&src=Main.aspx.2048001&visMode=0&currentViewMedia=8&documentID=3767E4C349F3D949B77297855678EEE0&server=XXXX&Project=YYYY&port=0&share=1&promptsAnswerXML=<rsl><pa pt="8" pin="0" did="1965EB7842BD4B37D56AD69F58386662" tp="10"><exp><nd et="5" nt="4" dmt="1" ddt="-1"><nd et="1" nt="5" dmt="1" ddt="-1"><at did="650A0FA446E9F26CE7B66AA1F81965A7" tp="12"/></nd><nd et="1" nt="2" dmt="1" ddt="-1"><mi><es><at did="650A0FA446E9F26CE7B66AA1F81965A7" tp="12"/><e emt="1" ei="650A0FA446E9F26CE7B66AA1F81965A7:123055432"/></es></mi></nd><op fnt="22"/></nd></exp></pa></rsl>

Hope this helps :)





Saturday 30 April 2016

Throwing error(Object BaseAttributeForm has already been deleted or is in an invalid state) while unchecking a table from attribute editor

This is a very common issue in Microstrategy 10. When we try to modify the source table list of an attribute form the following error message is shown "Object BaseAttributeForm has already been deleted or is in an invalid state".

Image source: Microstrategy technical support

Reason : This is a bug in the Microstrategy 10.

What do I do : This issue occurs only if the the table you want to remove comes before any other selected tables of sorted alphabetically.

For example, you had three tables selected A, B, C. Now you want to remove table A from the list. All you have do is

1. Rename A as D(anything that begins with D onwards),
2. Update schema then open the attribute editor again.
3. Now remove table D and Save and close. Update schema.
4. Rename D as C again.

You are good to go :)

Thank you so much for reading!


Why another Microstrategy blog?

Hi everyone, it's been pretty long period that I am working with Microstrategy. Microstrategy is a very powerful BI tool which is used in large number of projects worldwide. But to be honest it's not that developer friendly like some newer reporting tools. After working with it for years now I still feel that I don't even know fifty percent of what MSTR can do. There are lot of things that I come to know everyday. There are lot of things which seems impossible at the first glance but after spending a couple of hours or two we find a way most of the time. There are a hell lot of customization that we can do in MSTR which you might not be able to do in other tool.

I am not Microstrategy guru but I thought of sharing my day-to-day learnings with everyone who is working with Microstrategy and would love to learn from them.

I don't want to post the basic tutorials over and again in this blog as there are lot of materials available on the internet. I will try to cover all kind of tips and tricks that we might need and will try to address the issues that we face everyday.

Please feel free to write your ideas, suggestions and answers.

Thank you