Editing a PowerView RDLX file in Sharepoint 2010
Since I’ve not managed to get a post written up in about a month, I figured it was well past time to pull my finger out and get something posted. As part of my recent work with PowerPivot and Sharepoint 2010, I’ve also been playing about with PowerView as a quick UI. For anyone who hasn’t tried/heard of PowerView, I suggest checking it out here.
Although a PowerView report is actually run as a Silverlight object when viewed in your browser through Sharepoint, you’ll see if you choose to download the file that it is actually saved as a .RDLX file, remarkably close to the standard SSRS (SQL Server Reporting Services) report file format of .RDL. So, this suggests there might just be some similarities in there somewhere, right?
Fortunately, Dan English’s excellent article describes what can be found inside a PowerView .RDLX file and how to open it on your PC. In a nutshell, Dan has discovered that the .RDLX file is actually just an archive containing a number of other files used to drive the PowerView, including image previews (as seen in the Sharepoint library containing the PowerView), an XML file maintaining state and our old SSRS favourite, a bog-standard .RDL file. So, if you want to actually EDIT the details of the report, now’s your chance.
Now, why would you want to do this? Well, when you create a PowerView, you do it by selecting an uploaded Excel PowerPivot file and choosing to “Generate PowerView report”. Doing this associates it with that PowerPivot file. If you happen to have versioning enabled in Sharepoint, or you simply want to migrate your PowerView to another model, you need to recreate it from scratch. Fortunately PowerViews are extremely quick to build, so this may not be an issue, but there still might be situations where you need to change the Data Source or underlying Dataset query for a PowerView and don’t want to rebuild it.
Editing the file is as simple as opening the .RDL file in ReportBuilder, SQL Server Data Tools (BIDS to those who’ve been around the block) or if you’re feeling brave, digging into the XML in a text editor. As long as you’re keeping your edits simple (changes to parameters maybe, or switching to another Data Source to get around versioning or create duplicates) you shouldn’t run into any problems.
Once you’re finished, zip the folder back up and rename to .RDLX again (making sure to use the exact same settings as when decompressing to avoid corrupting the archive) and upload to your Sharepoint site.
Next up, I think I’m going to try creating a PowerView without editing any UI elements and manually editing the content of the .RDL file and see if it will pick up my changes when I redeploy it. But that’s a story for another time. In the meantime, if you’ve got down with the nitty gritty of PowerView or even tried extensively editing the underlying .RDL file, why not let me know in the comments below?