I recently deployed an SRS Dashboard into an environment that had some interesting restrictions. Users inside the network could access through the usual http://crmserver:5555/ URL. However, users outside of the DMZ had to access CRM through a special URL, such as http://crm.companyname.com:5555. The problem with this is that the URL that you place in the sitemap to point to the dashboard report is static. To get around this and account for the different access methods we did the following.
Note: This post is contingent upon already knowing how to display a Dashboard as an option on the Navigation Bar or as your home page.
1) Get the URL of the Dashboard report you are referencing. To do this, run the dashboard report from the reports area of CRM. Once rendered, hit CTRL-N to open the address bar. Copy the contents of the address bar. It will look something like this:
http://CRMORGNAME:5555/crmreports/viewer/viewer.aspx?id={4821DECB-EDA9-DE11-A944-000C291643D3}&helpID=SALES%20DASHBOARD.rdl&action=filter
2) Open Notepad and paste the following text into it. What this does is examine what URL is being invoked and uses that specific URL. Be sure to note the following:
- In the strReport variable the port is stripped out and only the organization name is used. The rest is exactly what you copied in step 1.
- Replace any text that is in all caps with your deployment specific information.
<%@ Page AutoEventWireup=”true” %>
<%
string strReport = “/CRMORGNAME/crmreports/viewer/viewer.aspx?id={4821DECB-EDA9-DE11-A944-000C291643D3}&helpID=SALES%20DASHBOARD.rdl&action=filter”;
string strHost = Request.Url.Host;
string strUrl = “”;
if (strHost.ToLower() == “CRM.COMPANYNAME.COM”)
{
//Response.Redirect(strUrl + strReport);
strUrl = “http:// CRM.COMPANYNAME.COM ” + strReport;
}
else
{
//Response.Redirect(“http://crmserver:5555″ + strUrl);
strUrl = ” http://crmserver:5555″ + strReport;
}
Response.Redirect(strUrl);
%>
3) Save this file as DashboardRedirect.aspx in the \ISV folder underneath the installation folder of your CRM deployment.
4) Export the Sitemap.xml from CRM.
5) Open the file in a text editor.
6) Find where you want to have the Dashboard link displayed on the navigation bar and paste the following text:
<SubArea Url=”/ISV/DashboardRedirect.aspx” Icon=”/_imgs/ico_16_9102.gif” Title=”Sales Dashboard” />
7) Save the Sitemap.xml and import back into CRM.
Now, when clicking on the Sales Dashboard link from the navigation pane, the redirect page will be called and the correct URL for the dashboard report will be invoked.