I have a C# app that generates SSRS Reports which are either attached to an email or added to the body of the message if the rendering format is HTML. Emails are looking great and then someone opens it in the gmail web client and sees a nasty [message clipped] message, turn outs gmail clips the contents of an email body if it is bigger than 105kb.
I render my reports using the ReportExecutionService class which contains a method called Render; Render accepts a DeviceInfo parameter that when set to null gives you the full HTML document, however if you set the value of DeviceInfo to
<HTMLFragment>True</HTMLFragment></DeviceInfo>" you get a fragmented small html file that renders in gmail perfectly.
The code snippet below provides a simple inline if statement to set the value
string deviceInfo = format == "HTML5" ? @"<DeviceInfo><StreamRoot>/</StreamRoot><HTMLFragment>True</HTMLFragment></DeviceInfo>" : null;
Awesome Post explaining how to best setup an SSAS Parent Child hierarchy in SSRS,
However if you have a ragged hierarchy you wind up with repetitive members, to address this issue you can use the following visibility expression in the Row Group properties
In the ‘Row Groups’ Pane click the down arrow on the grouping and select group properties.
- Select Visibility
- Select Show or Hide Based on Expression
- insert the following expression ‘=iif(Instr(fields!fieldName.UniqueName, “DATAMEMBER”), true, false)
Found this handy post outlining the the correct format for creating a URL to render a SSRS report hosted in SharePoint integrated mode.
Very handy for creating Go To URL Actions, speaking of which if you want to open your report in a new window check out the post below.
So it turns out that refreshing all reports on a dashboard may not provide you with the desired user experience; Content Editor to the rescue.
Add a Content Editor Control web part to your Web Page
First find the ID of the Refresh Button on on the SSRS webpart tool bar of the report to be refreshed; I used IE Developer tools to find the ID.
Once you have the ID, add the following script to the content Editor control and every 60 seconds the report gets refreshed.
var btn = document.getElementById(“ID Goes Here“);
Thank you Brian Keay for your post
If you happened to find this post and were pulling your hair head like I was when you copied and pasted Brian’s code snippet and it did not work, try deleting the single and double quotations and retyping them in, stupid fonts. If you did not find Brian’s post I have included his code snippet below
// The time out value is set to be 60,000 milli-seconds (or 60 seconds)
Couple additional things to note.
1. you can save this script into a text file, store in a document library and point your content editor -> content link to the txt file
2. you can also type the script directly into the Content Editor HTML Editor, click in the content editor in edit page mode. You will see the Content Editor Ribbons. On the Format Text Ribbon there is a Markup section where you will find an option to edit HTML, type the script there.
Wait 60 seconds and voila, refresh
A giant thanks again to Brian
The other day a client needed a utilize the same SSRS Report in 4 places on the same Performance Point Dashboard, pretty simple right, yup create 4 PPS SSRS reports with the correct default parameters and drop them on a dashboard. Well it turns out that when the reports refresh themselves the default parameters do not get reused and the parameter used for reports gets carried forward from the report that was previously refresh, Arg!
So the solution was to create a SharePoint page with four report viewer web parts. One thing to note is that every time you edit a reportviewer web part the tool bar options all get re checked, even if you have painstaking unchecked them previously.