SSRS 2008 - rs:Format=EXCEL not executing reports Stored Procedure
Hi Folks, I'm relatively new to SSRS, so I might be missing something here. I'm hoping one of you can help me out with a problem I'm having. Product Overview: Application Development Environment: RAD Studio 2010 in C++ Personality Database: SQL Server 2008 R2 Reporting Services: 2008 R2 We're are developing an application which, among many things, generates financial report. The reporting side of things works very well. However, we have added a mode which allows the user save the report into Excel by default. Our application generates a URL which is passed to a wrapped web browser, which in turns generates the report. So when the user selects to export directly to Excel, the application simply appends &rs:Format=EXCEL to the URL. The web browser component is called TCPPWebBrowser and is a wrapper for SHDocVw_TLB. When the report is executed normally (as in, it renders within the applications embedded web browser), all works fine. We have a report with six pages of data. We can export the report to Excel from here by clicking the Export button, and again, that works nicely too. However, if we add the &rs:Format=EXCEL to the URL, the report fails to return data. I added a simple logging statement to the stored procedure that the report calls, and the SP isn't even called when we're use &rs:Format=EXCEL, but it is when we don't use that parameter. These are the two URLs which the application generates. First is the standard render to screen: http://sje6520:1618/ReportServer_SQL2008_R2L1?/ReportServer_SQL2008/6021+-+Promotional+Change+Audit+Report&rs:Command=Render&startdate='2012-01-01'&enddate='2012-12-31'&referencestartdate='2012-01-01'&referenceenddate='2012-01-31'&isIncremental=0&promoStatusFilter=0&jobno=12&reportID=137&languageID=en-au Second is the render to Excel. http://sje6520:1618/ReportServer_SQL2008_R2L1?/ReportServer_SQL2008/6021+-+Promotional+Change+Audit+Report&startdate='2012-01-01'&enddate='2012-12-31'&referencestartdate='2012-01-01'&referenceenddate='2012-12-31'&isIncremental=0&promoStatusFilter=0&jobno=12&reportID=137&languageID=en-au&rs:Format=EXCEL We remove the &rs:Command=render, and added the rs:Format=EXCEL. This is the only difference between the two URLs. If I use IE and paste the URLs in, I get a perfectly rendered Excel document. --Update-- So I've just re-run the report while typing this up, and I've found something strange. Once I have setup my report's parameters and click Go, almost immediately I am shown an Open / Save dialogue. If I click Open as soon as it's shown, the report renders with no data. However, if I wait for a few seconds - say five or so and then click Open, I have data in the report. Is there anyway to prevent the Open / Save dialogue from showing so quickly (before the report has finished generating)? This report is one of our faster reports. If I select some of our big reports, they can take 10+ minutes to render normally. We ideally need the Open / Save dialogue to show once the data is in the file to download. Any help at all would be really appreciated as I'm at the end of the line with ideas now. Many thanks, Stuart Johnson.
May 30th, 2012 9:03pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics