Kanithi's Professional Blog

March 7, 2011

Calling a SharePoint page from Report Viewer web part using SP Dialog box

Filed under: SharePoint 2010 — Veera Kanithi @ 9:03 pm

If you are using a Report Viewer web part to show a SSRS report either in Native or Integrated mode and want to open a page in modal dialog box, i think its easy to use SP ModalDialog property and it looks much better in Share Point 2010.

In the report designer, under Placeholder properties of any text, add the following Expression for Action property

="javascript:void(SP.UI.ModalDialog.ShowPopupDialog(‘/SitePages/Test.aspx’))"

Its as simple as this, this will open the new page in a Share Point way. But make sure that Test.aspx is either an Application page or a ASPX page not any Web Part page that requires a Ribbon control, otherwise you might see this error below.

The Ribbon Tab with id: "Ribbon.Read" has not been made available for this page or does not exist.
Use Ribbon.MakeTabAvailable().

Create a free website or blog at WordPress.com.