You can create a menu wherever there is an URL-action-property in SSRS.

Each menu can have 1 to 7 menu items (t.i. up to seven rows) each menu item can be a link to an url/report, a note or a submenu. We distinguish between a number of different menu items type:

Menu item type Result
URL Clicking this menu item will replace the current page with the url you provide.
Report This menu item will open a SSRS report on the current page
PopURL & PopReport In this case the URL/report will be opened in a new browser window
PopURLModal & PopReportModal Another variation, the URL/report is opened in a new browser window with minimal adornment
Note A note is just a html part that is displayed. It can be used for f.e. the display of additional information like definitions. As it is html, the note can contains links and images.
SubNote A subnote is a note that will appear when the menu item is clicked, this is useful when you want to combine f.e. the definition of a metric with drill through options.
Submenu A submenu allows you to display a new menu, when the menu item is clicked

You can use HTML tags for the labels, and, off course, also for the notes.

For each menu item you have to provide three parameters: label, item type and the action:

Menu item type Label Item type Action
URL, PopURL, PopURLModal Label (html) that will appear in the menu URL, PopURL or PopURLModal the URL (without the http:// part)
Report, PopReport, PopReportModeal Label (html) that will appear in the menu Report, PopReport or PopReportModeal Report name and parameters (without the server part, cfr installation)
Note The text (html) of the note Note empty
SubNote Label (html) that will appear in the menu SubNote The text (html) of the note
Submenu Label (html) that will appear in the menu Submenu The definition of the submenu


Example 1

="javascript:menuPopper('Go to google','URL','','Go to Yahoo,'PopURL','"

This will show en menu with two items: Go to Google and Go to Yahoo. When you click the first the current browser window will redirect to google, the second will open a new browser window with yahoo.

Example 2

="javascript:menuPopper('Go back to management dashboard', 'Report','\ManagementReports\ManagementDashboard','Show top 10 stores','PopReport''\ManagementReports\TopStores&topcount=10','Show this months inventory','PopReport','\Inventory\Inventory&OnDate=" & DataSet1!Month.Value & "');"

This menu has three items. All three go to reports. The first uses the current window, the other two use a popup window. The third item uses the context to add the date to the report.

Example 3

="javascript:menuPopper('<u>More Info</u></br>The calculation of this metric...', 'Note','');"

This "menu" has just one item: a note. It will display the note in a yellow message, when the report item with the corresponding action is clicked.


Example 4


This menu creates the menu that is displayed on the home page (the URL’s/reports are dummies).
We have a menu with 3 items:


The first will open a new window (to google), the second is a submenu, and the third is a subnote.

The submenu has also 3 menu items:


The action for the submenu item is the definition of a menu:
            \'Top 10 stores\',\'PopURL\',\'\',
            \'Bottom 10 stores\',\'PopURL\',\'\',
            \'Top 10 growth vs prev year\',\'PopURL\',\'\');'

Notice that we have to take care of the string markers. Because we have strings within strings we now have to escape them therefore the label 'Top 10 stores' becomes \'Top 10 stores\'


Named Menus

When your menu’s become more complex you are faced with two problems:

  • the javascript becomes unreadable, especially if you have to add expressions that transform report-parameters or dataset-elements
  • the javascript becomes too long
    When you have a menu that uses the same parameters/dataset-elements for different menu items (fe: ‘View sales by sales person’, ‘View top 10 sales’, ‘View sales by region’: you’ll be passing information with regards to the date, the selected products, etc) to each of the SSRS-reports behind these menu-items. That means that in the acton-url the parameters will be passed several times, creating a very long URL.

The solution is to separately define the menu, give it a name, and then invoke it with the right context.

You create a menu definition by adding a textbox to your report with the definition in it. For our last example this would become:

Every menu definition has to start with the marker #MENUDEF followed by #<menu name> .
Then you add the definition as you would before (starting with another #). In every place you want to use a dynamic element (typically a context item, f.e. the current date, products, region,…) you add #P1# , #P2#, …, #P7#.

To invoke the menu, you use the following expressing in the action item:


The more general syntax is: namedMenuPopper(menuName, P1, P2, P3, P4, P5, P6, P7);
where P1 .. P7 are optional.
#P1# will then be replaced by P1, #P2# by P2 and so on.
This way P1 will only be passed once in the action-URL even if you use it several times in the menu.


  • the textbox that contains the menu definition must be visible (else SSRS will not include it in the HTML page)
    Obviously you don’t want it to be visible, the best way is to set the text color to the background color and to make the textbox very small
  • the function namedMenuPopper will simply replace each occurrence of #Px# with the provided parameter(s) and than execute the resulting script
    This means you could use the following menu definition:
  • to aid in debugging the menus you can use the function namedMenuShow(menuName, P1, P2, P3, P4, P5, P6, P7); in the action-url
    this will show the menuPopper statement after all the Px-parameters have been replaced with their actual values.

Last edited Dec 7, 2015 at 4:54 PM by Antoon1, version 18