EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB40138: How to execute JavaScript from a Report Services Document in MicroStrategy Web 9.x and later.


Community Admin

• Strategy


Ability to execute a javascript function from a Report Services Document.

It is possible to execute a JavaScript function from a Report Services Document.
Prior Strategy 9.0 the HTML container functionality was not available (please refer to KB30198 for information about HTML containers). This technical note describes how to invoke and execute any JavaScript function from a regular hyperlink within a Report Services Document.
You will need to follow these steps:

  • Inside the Report Services Document insert a text field (or an object which allow you to establish a link like an image)
  • Within text field’s ‘Navigation->Hyperlink’ properties insert the javascript call function as follows
    
    javascript:<my_funtion>('/MicroStrategy/<path>/<page_where_myfunction_is.aspx>',
    '<myfunction_parameters>');
    


    For example if you want to invoke in a new window an aspx page called ‘ChangeDateRange’ the syntax would be
    
    javascript:openWindow('/MicroStrategy/_custom/asp/ChangeDateRange.aspx?documentID=CDBD4CC7487138B4ABD18BBCB5FC6FEF','getNewDatel', 175, 220);

     
    Note: Replace : to :
  • You will need to modify Strategy’s Web security in order to enable javascript functions execution. Enter to Web’s Administrator page.
     
  • Check the property ‘Allow javascript execution for Report Services Documents Hyperlinks’ under Security->User Input Filtering

ka04W000000OacyQAC_0EM44000000RGA2.png
  • You will now be able to click on the Report Services' text (or image) and invoke the javascript function


43904 KB43904


Comment

0 comments

Details

Knowledge Article

Published:

April 3, 2017

Last Updated:

November 14, 2018