Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Reporting - multipage EMF report issues

I would love anyone's assistance regarding this issue. The issue has been the bain of many in that rendering an EMF format report programattically does not work in SQL2008 R2 and also SQL2012.

This is logged through MS connect here: https://connect.microsoft.com/SQLServer/feedback/details/560911/sql-2008-r2-reportexecutionservice2005-broken-with-image-emf#tabs

In summary, when calling the Render method of the ReportExecutionService object, it gives back the first page along with an array (via output parameter) of stream IDs to map the subsequent pages. You then call the RenderStream method on that stream for each subsequent page. Works great in 2008. In 2008 R2 / 2012 the array of stream IDs comes back empty meaning you only get the first page - making it useless.

I was happy to see that MS released a hotfix for 2012 to fix it: http://support.microsoft.com/kb/2637802

However, after installing the hotfix / restarting / etc, I still have the problem. Has anyone gotten the hotfix to work? Had the same experience? Know a workable solution for a large report?

Thanks for any assistance. Steve

like image 967
MrCraze Avatar asked May 17 '12 05:05

MrCraze


1 Answers

For EMFs with multiple pages you have to use the rs:PersistedStreams=True and rs:GetNextStream=True URL Access Parameters. More information on those here: http://blogs.msdn.com/b/jgalla/...

Unfortunately that won't help you immediately because you cannot use URL Access parameters from the SSRS Execution Webservice.

You will have to either construct a WebRequest as shown in the above blog (you need to put the entire url together yourself) or use the ReportViewer control as shown here: http://blogs.msdn.com/b/brianhartman/...

Here is also a discussion about the multipage EMF issue. The above links also included there.

One last note, I tested on an installation of SQL 2008 R2, later added SP1 then SP1 CU6. SP1 CU6 contains the hotfix according to this. The streamIDs parameter remained empty for EMF in all cases as said. Anyway, On my machine SQL 2005 was previously installed, and maybe 2008 at some point. Some posts indicate previous installations of SQL Server may be an issue, so a clean OS install might help. If you are desperate for this to work.

like image 113
H B Avatar answered Oct 18 '22 23:10

H B