SSRS Image Renderer does not return all pages
We are using Printer Delivery Extension sample provided by Microsoft. It works fine with SQL Server 2005 Reporting Service. We are planning to migrate our tool on SQL Server 2008 Reporting Service. We are facing following problems:
1) Report get zoomed and printed on paper. [This is solved by setting PrinterDpiX/Y setting in Device Info and doing scale transform.]
2) When we call Render method on Report object, it only return one file for EMF image although report is of multiple page.
// PrinterResolution.X and Y is 600
deviceInfo = String.Format(System.Globalization.CultureInfo.InvariantCulture,
@"<DeviceInfo><OutputFormat>emf</OutputFormat><PageHeight>{0}</PageHeight><PageWidth>{1}
</PageWidth><PrintDpiX>{2}</PrintDpiX><PrintDpiY>{3}</PrintDpiY><StartPage>0</StartPage>
</DeviceInfo>"
,pageHeight, pageWidth, printerSettings.DefaultPageSettings.PrinterResolution.X,
printerSettings.DefaultPageSettings.PrinterResolution.Y);
// Render report
m_files = notification.Report.Render("IMAGE"
, deviceInfo);
Report is of 2 pages and Render method return only first page .
We set the tracing level to 4 (verbose) and following are the line from log file:
reportrendering!WindowsService_0!1a7c!02/24/2011-14:01:36:: v VERBOSE: PR-DIAG [Page 1] Member 'Profile.RH.1(Profile_Group)' kept together - Explicit - Pushed to next page
reportrendering!WindowsService_0!1a7c!02/24/2011-14:01:37:: v VERBOSE: PR-DIAG [Page 2] Page created by Vertical page break
chunks!WindowsService_0!1a7c!02/24/2011-14:01:37:: v VERBOSE: Retrieved segment 4c74977d-f03f-e011-bcca-001a6b46f0f8 for chunk 2d74977d-f03f-e011-bcca-001a6b46f0f8 from the segment cache
chunks!WindowsService_0!1a7c!02/24/2011-14:01:37:: v VERBOSE: Retrieved segment 4e74977d-f03f-e011-bcca-001a6b46f0f8 for chunk 2d74977d-f03f-e011-bcca-001a6b46f0f8 from the segment cache
chunks!WindowsService_0!1a7c!02/24/2011-14:01:37:: v VERBOSE: Retrieved segment 5374977d-f03f-e011-bcca-001a6b46f0f8 for chunk 2d74977d-f03f-e011-bcca-001a6b46f0f8 from the segment cache
reportrendering!WindowsService_0!1a7c!02/24/2011-14:01:37:: v VERBOSE: PR-DIAG [Page 2] 'Profile.RH.0(Static)' appears on page due to RepeatOnNewPage
From log file it seem that second page is create due to Vertical page break and still we are getting single file as return value from Render method.
Regards,
Rakesh Patel
February 24th, 2011 6:10am
Hi Rakesh,
You may find a little help from this thread
http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/0d9d2b53-117c-4cec-9e51-3b678720a75e .
thanks,
Jerry
Free Windows Admin Tool Kit Click here and download it now
February 28th, 2011 9:52pm