Removing Sections of a Report via URL API

While working with the Web SDK to try to make a small customization, I stumbled on a pretty useful set of URL API codes that allow you to quickly modify the Report Page by removing various elements.  While such customizations are common, I wasn’t aware that they were available out of the box.  I would think that these would be very useful in doing simple linking to reports via an IFrame from another application, such as a Portal.

The trick to get the URL for a Report by right clicking it in Web, choosing Properties, and then copying the Link at the bottom.  Now, locate the src section of the URL:

ASP:
&src=Main.aspx.4001 

JSP:
&src=mstrweb.4001

and add in one of the transforms just before the .4001.

Available transforms that I’ve found:

reportNoHeader
reportNoHeaderNoFooter
reportNoHeaderNoFooterNoPath
reportNoHeaderNoFooterNoPathNoToolbar

Example:

ASP:
&src=Main.aspx.reportNoHeader.4001

JSP:
&src=mstrweb.reportNoHeader.4001

Unfortunately, these are actual transforms and not flags, so you can’t mix and match to fit your needs (for example, if you only want to hide the toolbar, reportNoToolbar will NOT work).  Those are the only 4 that you can use that I’ve found, but they may be handy in a pinch and best of all, not require customization work to use.

Update:

Another method of doing this that does let you pick and choose and supports documents as well:

&hiddenSections=header,footer,path,dockTop

Place that code in the URL, for example:

http://webserver/Microstrategy/asp/Main.aspx?Server=ISERVER&Project=PROJECT&Port=0&evt=2048001&hiddenSections=header,footer,path,dockTop&src=Main.aspx.2048001&visMode=0&documentID=04AACFE445AD69198676C8AD56245118&currentViewMedia=2

List of options (case sensitive):

  • header
  • path
  • dockTop
  • dockLeft
  • dockRight
  • error
  • content
  • dockBottom
  • footer

You may also like...

23 Responses

  1. Joost says:

    Is there also a way to specify the user credentials with this url api? so that the login page can be omitted

  2. Bryan says:

    If you’re using standard authentication, you can append &uid=username&pwd=password to the end of the URL to automatically login. That’s obviously not ideal security. If you’re using any kind of automatic login like Windows Authentication, then you don’t have to pass anything different in the URL, it’ll happen on it’s own. There are also Single Sign On customizations in the SDK you can implement to hide standard user/password information from the URL if that’s the path you’re looking for.

  3. Joost says:

    Hey Bryan,

    We are looking into integrating Microstrategy reports into our own portal, the url api seems a pretty good solution for that. I guess we need to dive into the single sign on options.

    thanks, Joost

  4. Bryan says:

    MicroStrategy supports most Portal software directly, which may be easier than going this route. Check out http://www.microstrategy.com/Software/Products/Dev_Tools/SDK/PIK_FAQs.asp for more info. If you have a custom portal or one that’s not supported, then using URL API is my preferred method.

  5. Joost says:

    Well it is a custom portal, I just read there is an external security module in MicroStrategy. So I will look what the options are with this one to get us logged on.
    btw any idea if this url api also supports MicroStrategy documents or dashboards?

  6. Joost says:

    A custom external security module seems to be the solution in my case. One can pretty easily write a custom authentication java class for microstrategy and plug it in the system (by extending AbstractExternalSecurity). This class can omit the login page by providing your own coded authentication method

  7. Ibai Iglesia says:

    Hi Bryan:

    I need to remove the toolbar for a project. The issue is that as we are using “answer dinamically” we cant edit the URL to add the hiddensections=”docktop” parameter.

    I need to show only the report in full screen without any other toolbars and in case ok making a customization should be project level (no server level).

    The html tag is not valid also as we dont have all the parameters to pass in the fact table and have some hierarchies.

    Any help with this would be very welcome. Managing privileges is not possible also as there is a minimum numbers of buttons that you always see (standard toolbar) and I dont want for example the user to be able to navigate home.

    • Bryan says:

      Removing the toolbar for the server is a simple customization, but removing it for one project is a more difficult one. The difference is that for the server level, you just comment out some lines in an xml file, but in order to add the intelligence for a project level removal, you have to write a java addon. There are examples of doing that in the SDK, but I’ve never tried to do it based on project (I’ve done it based on user, and it wasn’t that bad, just lots of steps).

    • Ibai Iglesia says:

      Thanks Bryan, do you know any other possibility to deal with this problem in an easier way?

  8. Ibai Iglesia says:

    Bryan I realized that when you open a doc with dockTop as hidden, the following docs you open from there will inherit this parameter, so is automatically solved. Thx.

  9. Hello everyone. First of all, congratulations for your blog, Bryan, it’s a great help for advanced MSTR users.

    I have an issue that maybe any of you have an answer. I want to link to some reports from a portal, and with the hiddenSections params, I manage to hide some toolbars the common users mustn’t see.

    But, and here’s the problem, there’s the toolbar that has the export options buttons. Those must be viewed (and used) by the users, but in the same toolbar also appear the navigation buttons (forward, backwards, parent folder). If the user clicks on the parent folder button, they are redirected to the microstrategy folder where the report lies. And that’s what I want to avoid.

    Does anyone know a way to hide or disable these buttons from this toolbar?

    There’s a (less desirable in my particular case) workaround, which would be to post links with the export options and hide this toolbar, showing only the report grid.

    • Bryan says:

      Personally, I’d add my own export links to the dashboard (though I see you don’t want to do that). The other alternative is to simply revoke the Browse permission from the ACL of the Everyone group (set it to Default and not Deny). This way if they do hit that up arrow, they’ll just have a blank folder and not the components. They’ll still have access to execute the dashboard, so it won’t affect your portal links.

      Other than that, you’re looking at some pretty basic customizations to remove individual toolbar items globally (all projects on the webserver) or a more complicated java based addon to remove specific buttons for specific users on specific reports.

  10. Thanks a lot Bryan. In the meantime, I worked out another solution that could be enough for less experience users:
    Save the report with the check “Show always in fullscreen mode” off (that is set in the tools menu), and link to the report with the parameter hiddenSections=header,path,dockLeft,dockRight,dockBottom,footer

    That way, the user sees the tools-format-grid menubar, but the navigation buttons are hidden. They appear if the “Fullscreen mode” button is clicked, what (for less technical users) shouldn’t happen in the 90% of the cases.

  11. Oleg Runov says:

    Bryan, where can I find the full API documentation?

  12. Unknown says:

    HI Bryan,

    Is there a way we can send messages ( notification of maintanence etc)
    to active users in 9.2.1m or 9.3 ? Earleir Command manager has send message feature to use Windows messenger to push those out.

    • Bryan says:

      I think the best thing to do is avoid maintenance when users are active 🙂 What I generally do is update Project_Content.aspx/jsp and just add a message at the bottom announcing maintenance. If users gets bumped off or arrive when the iserver is down, they’ll see the message letting them know something has happened. There’s no built in notification system.

    • Hi Bryan,

      I see Project_Content file in ASCX file format.Our configuration is MicroStrategy 9.3.0 Hotfix 2. Can you please let me know if I am seeing the correct file and also the script to add message during maintenance activities.

      Thanks in advance.

  13. Light says:

    Hi Bryan, so this works only for document right? Do you know any trick so we can use URL API to link to a report and by default we hide report object, report details, prompt details and show view filter section?

  14. maritimo says:

    Hi Bryan,
    &src=mstrWeb.rwd.2048001&visMode=0&currentViewMedia=1&documentID=<> &hiddenSections=header,footer,path,dockTop doesn’t work for Express mode. Is there any trick without doing any customization?

  15. Maritimo,

    We ran into simliar problem. We found a way to hide the toolbar in Express Mode.

    The URL should have the following instead to hide the toolbar in express mode or prompted reports:

    &hiddensections=dockTop,dockLeft,header,footer,path

  16. Evgenya says:

    Hi Bryan,
    If add to the URL parameter “&hiddenSections”, Microstrategy add it to all URL
    (Because this value is stored in temp cookies, it remains in effect for the duration of the session. Any subsequent request within the same http session will keep the specified page sections hidden. to make the page sections visible again during the same session, you must add the hiddenSections = none parameter to the URL – https://lw.microstrategy.com/msdz/MSDL/931/docs/mergedProjects/websdk/topics/scenarios/MicroStrategy_URL_Parameters.htm).

    The same happens with the external links! (e.g., http ://google.com/&hiddenSections=dockTop). How do I get around?

Leave a Reply

Your email address will not be published. Required fields are marked *