Monday, October 29, 2007 3:11 PM srkirkland

Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Exporting a SQL Server Reporting Services 2005 (SSRS) Report Directly to PDF/Excel is a handy way of generating high quality reports without being stuck to using the ReportViewer interface. Sometimes the ReportViewer interface is an unnecessary step, but other times the ReportViewer won't render correctly even though the underlying report is correct. This is especially true when your audience might use Firefox or Safari (or anything other than IE), since the ReportViewer control almost never outputs a readable report. Of course it would be nice to just have a button on your page that generates a PDF or Excel file in any browser, and uses a SSRS back-end to do all of the report creating and heavy lifting.

The following code will show how to export such a report, including the passing of an arbitrary number of custom parameters. Note that the identity of the application pool that your website runs under will need to have at least "browser" access to the folder containing the report you want to display. This is usually pretty simple if both the IIS and SSRS server are within the same domain, but it might be tricky if this is not the case.

Microsoft.Reporting.WebForms.ReportViewer rview = new Microsoft.Reporting.WebForms.ReportViewer();
//Web Address of your report server (ex: http://rserver/reportserver)
 
rview.ServerReport.ReportServerUrl = new Uri(WebConfigurationManager.AppSettings[”ReportServer”]);
 
System.Collections.Generic.List<Microsoft.Reporting.WebForms.ReportParameter> paramList = new System.Collections.Generic.List<Microsoft.Reporting.WebForms.ReportParameter>();
 
paramList.Add(new Microsoft.Reporting.WebForms.ReportParameter(”Param1″, “Value1″));
paramList.Add(new Microsoft.Reporting.WebForms.ReportParameter(”Param2″, “Value2″));
 
rview.ServerReport.ReportPath = “/ReportFolder/ReportName”;
rview.ServerReport.SetParameters(paramList);
 
string mimeType, encoding, extension, deviceInfo;
string[] streamids;
Microsoft.Reporting.WebForms.Warning[] warnings;
string format = “PDF”; //Desired format goes here (PDF, Excel, or Image)
 
deviceInfo =
“<DeviceInfo>” +
“<SimplePageHeaders>True</SimplePageHeaders>” +
“</DeviceInfo>”;
 
byte[] bytes = rview.ServerReport.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
 
Response.Clear();
 
if (format == “PDF”)
{
Response.ContentType = “application/pdf”;
Response.AddHeader(”Content-disposition”, “filename=output.pdf”);
}
else if (format == “Excel”)
{
Response.ContentType = “application/excel”;
Response.AddHeader(”Content-disposition”, “filename=output.xls”);
}
 
Response.OutputStream.Write(bytes, 0, bytes.Length);
Response.OutputStream.Flush();
Response.OutputStream.Close();
Response.Flush();
Response.Close();

One potential issue that you might run into upon deploying your project is that your application server may not have the ReportViewer DLLs that are needed. You have two options in this case. The first is to copy the three Microsoft.ReportViewer.*.dll's (ReportViewer.Common.dll, ReportViewer.ProcessingObjectModel.dll, and ReportViewer.WebForms.dll) from your development computer into the BIN folder of your application server (or into the GAC). The second option (though I have not verified it), is to install the SSRS redistributable on the application server (http://www.microsoft.com/downloads/details.aspx?familyid=8a166cac-758d-45c8-b637-dd7726e61367&displaylang=en).

Check out http://www.microsoft.com/sql/technologies/reporting/default.mspx for good SSRS resources, including some nice learning tools and report packs.

Filed under: , , ,

Comments

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, October 26, 2007 6:21 AM by Vikrant

That wonderful....raely it help me alot.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, October 29, 2007 11:48 AM by Ponic

Thanks, this is what I've been looking for. I'll try it and see if it works

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, October 29, 2007 9:31 PM by rajbk

Scott,

You could refactor the following lines of code:

if (format == “PDF”)

{

Response.ContentType = “application/pdf”;

Response.AddHeader(”Content-disposition”, “filename=output.pdf”);

}

else if (format == “Excel”)

{

Response.ContentType = “application/excel”;

Response.AddHeader(”Content-disposition”, “filename=output.xls”);

}

by using the "mimeType" and "exension" values.

See my example:

weblogs.asp.net/.../How-to-render-client-report-definition-files-_28002E00_rdlc_2900_-directly-to-the-Response-stream-without-preview.aspx

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Sunday, November 18, 2007 8:30 PM by Greg

I was hoping this code was going to solve a problem I'm having with IE7.  We have this code running on a page that was opened with Javascript (in response to a button from another page).  But when the content from RS is Excel, the browser window closes immediately.  When it's PDF, the window opens fine to show the PDF report.

Does anyone have any ideas why the browser closes?  Scott, is the above code working for you on IE7?

Thanks for any help.

Greg

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, November 19, 2007 6:51 PM by srkirkland

Greg,

 I did just now confirm that the code works for PDF/Excel on IE7 (as well as my normal browser FireFox 2.0).  I'm not sure why your browser closes, but it sounds as though the open/save file dialog is the culprit.  Since PDF works fine (which is in-browser in your case) there must be a problem when the Excel file attempts to be downloaded.  Sorry I can't be more help than that, but hopefully this can get you on track.

Scott

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, November 28, 2007 3:11 PM by Chris

Great!  I did this with ASP sometime back and forgot how in my old age.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, November 30, 2007 3:16 PM by Meg

Anyone have any idea how I can use the script above and have the output file become an email attachment without opening Adobe Reader?  Any info would be greatly appreciated!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, January 17, 2008 12:27 PM by Mark R

Any thoughts to a VB solution rather than the C# one provided?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, February 7, 2008 2:24 PM by srkirkland

MissCheeva,

  The report server url is the usually in the form http://rserver/reportserver">http://rserver/reportserver, which is different from the interface you usually browse to of http://rserver/reports.  From there you just add the report path from the root using ServerReport.ReportPath.  A good way to test is just to enter the url into your browser and see if the report listing comes up, and then add on the report path and it should render that report.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, May 29, 2008 5:12 AM by Deepak Khare

Can we export SRS 2005 reports into Excel 2007

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, May 29, 2008 4:20 PM by srkirkland

@Deepak,

  Natively SSRS 2005 will export to excel 2003 format, but of course this will open just fine in Excel 2007 and can then by converted if desired.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, June 25, 2008 3:22 AM by Egli

This code is great thanks!!!!! :)

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, July 2, 2008 1:23 PM by john Joseph

Excellent posting!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, July 16, 2008 5:28 AM by Morten

Very useful solution - thanks!!

Do you know if this works if the report server runs in "SharePoint integrated mode"

And what is the syntax for ReportServer and ReportPath in this scenario??

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, July 16, 2008 1:59 PM by srkirkland

@Morten,

 The full url for a report (like http://server/ReportServer/ReportFolder/ReportName">server/.../ReportName) can be broken down into the report server (http://server/ReportServer) plus path (/ReportFolder/ReportName).

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, July 28, 2008 4:10 AM by Anthony

Nice.  I am trying this code as I type this comment!

By the way, is there any way to send this attachment to someone else via email in SSRS2005?

I am trying to create a small application that when user clicks a button to create a report, it generates the report then send it to particular user via email with generated report attached in PDF format.

Thanks!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, August 20, 2008 11:46 AM by tigris7

I wonder if you have encountered a similar problem to mine....

In my case, the browser displays the reports correctly, but upon selecting PDF from the DDL, the built in Microsoft logic creates the PDF, but it loses all leading spaces, tabs, or indentations. Only some of the lines have these, and these lines are usually meant to be headers and are out of alignment.

The same ting happens when I use your code example... all leading spaces, tabs, or indentations are lost and data is misaligned.

Thanks in advance for any iinsight.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, September 12, 2008 3:54 PM by Will

This works great. Any way to automatically save to a specified directory instead of being bothered with the open/save/cancel dialog??

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, September 17, 2008 2:47 PM by QuestionDude

What no one seems to know how to do is, have the report print DIRECTLY to a printer.  I don't want the report to ever popup anywhere.  I want 60 reports to automatically print out to a printer after a used presses 1 button in a .net app.  Sigh :(

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, September 17, 2008 4:43 PM by srkirkland

@QuestionDude,

   I actually don't think it is even possible to print directly in any .NET app without something like an ActiveX plug-in.  This is actually a good thing though -- image the junk you would get if instead of launching popups, web apps were able to directly print things to your printer without user intervention.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, September 23, 2008 10:24 AM by GregB33

You can print directly by setting up a subscription on the report server.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, October 3, 2008 4:49 PM by Thuy Bui

Is there any way to do this silently w/o the save dialog showing up?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, October 7, 2008 12:06 PM by Jane

In SSRS How can get report in a stream format without a report viewer and without form.I am using C# .I need create some class to get report a stream format without a report viewer and without form

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, October 7, 2008 1:55 PM by Scott

@Thuy,

  As long as you set your Content-disposition to filename=fname instead of attachment=fname then the file can open directly in the browser (if you are using PDF).

@Jane,

  The only way to get a stream from a report server is to use the report viewer, but I don't see the problem because the report viewer can be created in code and the user never needs to see what's going on in the background.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, October 7, 2008 2:44 PM by Jane

I am in C#

Any idea how to create report viewer in code?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, October 7, 2008 6:00 PM by srkirkland

@Jane,

  This post explains how to create a report viewer in code -- notice the first line: Microsoft.Reporting.WebForms.ReportViewer rview = new Microsoft.Reporting.WebForms.ReportViewer();  If you actually want to display out the report in the report viewer, you can add it to your page's control tree or create it as a native control.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, November 20, 2008 6:06 PM by Jaime

Where do you supposed to put the code?

Thanks

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, December 2, 2008 6:55 PM by EKDT

Any idea how I could code this in VB.Net?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, December 3, 2008 9:38 AM by Paul Evans

I have several images mixed in with the text in my report.  They look very jagged in the pdf.  When displayed in a ReportViewer control on a web page they look fine.  When I manually export them from the ReportViewer to Excel or a Web Archive they look fine.  

Have tried them as jpgs, bmps, and pngs with similar results.  How can you get a smooth-looking image into a pdf from ReportViewer?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, February 11, 2009 3:29 PM by csnyder

Another way to open a pdf or excel is on a button click event add the following redirect:

Response.Redirect("development/Reportserver)

the format can be PDF or Excel and send the report directly to the desired format.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, May 6, 2009 9:47 AM by Christopher Smith

The above code works great, however is there a way to export multiple reports to an Excel file, with each report having it's own tab?

I want the user to be able to select one or more reports, hit a button and the result is one Excel file containing all the reports run.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, May 7, 2009 12:55 PM by Gris

Hi,

I want to export to PDF an report with params, Do you have any idea?

sorry, but I tried it, and i can't

Thank.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, May 7, 2009 1:00 PM by Gris

Hi,

I want to export to PDF an report with params, Do you have any idea?

sorry, but I tried it, and i can't

Thank.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, May 7, 2009 1:23 PM by Gris

Hola

para este mensaje

Hi,

I want to export to PDF an report with params, Do you have any idea?

sorry, but I tried it, and i can't

Thank.

----------------------------------

Ejemplo:

Donde WRCustomers es el nombre del webservice

Dim RSGuardar As New WRCustomers.ReportExecutionService

Dim WRParam(0) As WRCustomers.ParameterValue

                   WRParam(0) = New WRCustomers.ParameterValue()

                   WRParam(0).Name = "Estato"

                   WRParam(0).Value = "6578"

                   ' Cargo el report.

                   RSGuardar.LoadReport(Me.ReportViewer1.ServerReport.ReportPath, historyID)

                   RSGuardar.SetExecutionParameters(WRParam, "es-mx")

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, May 28, 2009 3:34 AM by Admir

Thanx a lot

Works like charm

Any Idea how to this exported report attach to e mail and send

to someone.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, June 17, 2009 11:39 AM by George

I want to export SRS 2005 reports exactly into Excel 2007. Because the report that I generate contains much more information than it is possible to fit in Excel 2003. can anyone help me?.. thanks

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, June 25, 2009 8:41 AM by Bill

Has anyone tested this code using SSRS 2000?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, August 17, 2009 2:39 PM by Luis

Does anyone have this code on visual basic??

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, August 27, 2009 3:48 PM by Doug

 Dim rview As New Microsoft.Reporting.WebForms.ReportViewer()

   'Web Address of your report server (ex: http:'rserver/reportserver)

   '  I used AppSettingsReader instead of WebConfigurationManager class

   Dim apr As New AppSettingsReader()

   rview.ServerReport.ReportServerUrl = New Uri(apr.GetValue("ReportServer", GetType(String)))

   Dim paramList As New System.Collections.Generic.List(Of Microsoft.Reporting.WebForms.ReportParameter)

   ' set your parameters

   paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("Param1", "Value1"))

   paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("Param2", "Value2"))

   ' set the name of the reportPath

   rview.ServerReport.ReportPath = "/ReportFolder/ReportName"

   rview.ServerReport.SetParameters(paramList)

   Dim mimeType As String = Nothing

   Dim encoding As String = Nothing

   Dim extension As String = Nothing

   Dim deviceInfo As String = Nothing

   Dim streamids As String() = Nothing

   Dim warnings As Microsoft.Reporting.WebForms.Warning() = Nothing

   Dim format As String = "PDF"    'Desired format goes here (PDF, Excel, or Image)

   deviceInfo = "<DeviceInfo><SimplePageHeaders>True</SimplePageHeaders></DeviceInfo>"

   Dim bytes As Byte() = rview.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)

   Response.Clear()

   If format = "PDF" Then

     Response.ContentType = "application/pdf"

     Response.AddHeader("Content-disposition", "filename=output.pdf")

   ElseIf format = "Excel" Then

     Response.ContentType = "application/excel"

     Response.AddHeader("Content-disposition", "filename=output.xls")

   End If

   Response.OutputStream.Write(bytes, 0, bytes.Length)

   Response.OutputStream.Flush()

   Response.OutputStream.Close()

   Response.Flush()

   Response.Close()

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, November 5, 2009 12:36 AM by Ali Adravi

Is that possible to send the report in mail as an atachment from SQL?

I have a report I want to mail it through a cheduling by creating a Job and chedule the report, is this possible?

If yes, could please send me the code or link.

Ali Adravi

Fakhruddin.ali@metaoption.com

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, February 3, 2010 3:15 PM by Ric Lloyd

Can this work for CSV files as well? Also, thie code below opens the CSV file in the browser. Any way to get it to go directly to file or to a file Save As... dialog?

       string rptServer = ConfigurationManager.AppSettings.Get("ReportServerURL");

       string rptPath = "?/IRIS_Reports/ExportMain";

       string rptOptions = "&rs:Command=Render&rc:Format=CSV&rc:Toolbar=False&rc:Encoding=ASCII&rs:ClearSession=true";

       string rptPrintWhat = "&PrintWhat=" + PrintWhat + "&RecordID=" + _globals.MasterRecordID;

       string cmd = rptServer + rptPath + rptOptions + rptPrintWhat;

       Response.ContentType = "text/x-plain";

       Response.AddHeader("Content-disposition", "filename=output.csv");

       Response.Redirect(cmd);

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, February 4, 2010 2:39 PM by Ric Lloyd

Remove "Response.ContentType" line and "Response.Addheader" line, both useless.

Change "rc:Format=CSV" to "rs:Format=CSV" and it doesn't display in the browser anymore. But, it creates a 0-byte file.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, June 15, 2010 4:14 PM by megha

This code was of great help ..thank you

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, July 14, 2010 6:16 AM by duckyvideos

how to start report from 2nd column instead of first column in the excel.

thanks

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, July 21, 2010 6:36 AM by hi

problem whith exporting  tiff files  usu=ing samecode

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, December 15, 2010 4:29 AM by Mujeeb

Hi This great article. Is there any code for word re-endering

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, December 20, 2010 1:18 PM by icicle

Response to the  'how to email attached pdf and xls - using concepts introduced on this page.'

I have not been able to identify a straightforward method to augment this code and email the displayed PDF.

One way you may want to consider is utilizing the SSRS scheduled emailing functions of the SSRS server. Choosing the report, creating a schedule, and  setting recipents is easy enough for the set schedule and recipient list, but how for something dynamic?

This is done in three steps:

1) set up a schedule under the 'site settings' page, to execute a report object every X minutes (10?)

2) create a new subscription. on the third page of the subscription setup, point to the table that will contain the records for the input parameters to the report to be emailed. The trick is to dynamically add records to this when a user clicks a link ( notifying the user, "you will receive the report via email with X minutes.)

3) create a job that clears the table form the datadriven step of the subscription every X minutes, but on a interval that is shifted a certain time.

The logistics will need to be verified, but I got somethign like this working. it is important to - make sure do not clear out any pending subscriptions, and make sure you the records before the scheduled job starts.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, January 6, 2011 2:20 PM by Eagle3

Does anybody know how to make the print dialog box pop up automatically after the pdf is displayed?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, February 4, 2011 12:31 AM by Asif Syed

Thanks. the concept is excellent...

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, April 11, 2011 10:03 PM by John

It works fine for me however I want to set export directory path.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, June 24, 2011 12:54 AM by sonu

I have a report for individaul employee. Now, from application if user selects multiple employees then i want to save the report for each employee in saperate pdf.

How can i save the reports directly without prompting the Save dialog box for each report?

Another approach i could take is to get a single PDF file containing each employee report on saperate page so that user can print this file and distribute the report to individuals.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, November 1, 2011 5:34 AM by hardik

What is the Work of deviceInfovariable ??

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Monday, February 27, 2012 11:11 PM by ss

01.Dim returnValue as byte()

02.Dim mimeType As String = ""

03.Dim returnValue As Byte()

04.Dim encoding As String = ""

05.Dim streams As String()

06.Dim warnings As Microsoft.Reporting.WebForms.Warning()

07.

08.

09.If Request.Params("exportformat") <> "" Then

10.returnValue = ReportViewer.ServerReport.Render(

11.Request.Params("exportformat").ToString,                  

12.Nothing,

13.mimeType,

14.Encoding,                

15.Request.Params("exportformat").ToString,                

16.streams,

17.warnings)

18.Response.Buffer = True

19.Response.Clear()

20.

21.Response.ContentType = mimeType

22.

23.Response.AddHeader(

24."content-disposition",

25."attachment;filename=" +

26.Request.Params("ReportName") +

27."." + Request.Params("exportformat")

28.)

29.

30.Response.BinaryWrite(returnValue)

31.Response.Flush()

32.Response.End()

33.End If

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, March 16, 2012 1:04 AM by Raghu

Please let me know where to write this code. I am getting error at response(Element not found) at resopnse.clear() when i added this code to a .cs class file in ASP.net application. Please let me know where i should write this code and references to be added to include Response.

Thanks

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, April 5, 2012 9:08 AM by satch

I would like to know the location where to add this code for my report.

Thanks

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Thursday, June 7, 2012 11:25 AM by 3dsoftology

Just  question, is there an add on for Excel / PDF export or has it to be the way described above?

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, September 21, 2012 6:13 PM by Gregory Garcia

Thanks a lot, this is useful.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, November 20, 2012 1:22 PM by Poornachadnra

Hi Guys,

             Can any body help me out... I got a one Task in my office. It's a big challenge to me. The task is SQLServer output should store in .txt and .pdf format in automatically for every one hour. then the same output is .txt send as SMS and .pdf format should sent as the email should sent as automatically for every 1hour....

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Sunday, March 10, 2013 7:51 AM by Davies

I all the time emailed this weblog post page to all my associates, since if like

to read it after that my friends will too.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, March 13, 2013 2:25 PM by gena

can anybody tell me how to use this code step by step

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Sunday, March 17, 2013 1:47 AM by Chesser

Nice post. I learn something totally new and challenging on websites I stumbleupon every day.

It will always be useful to read through content from other authors

and practice a little something from other web sites.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, March 20, 2013 9:58 PM by Conger

I every time used to read article in news papers but now as I am a

user of net therefore from now I am using net for articles, thanks to web.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, March 22, 2013 12:20 AM by Desantis

Hi there, just became alert to your blog through Google, and found that

it's truly informative. I am gonna watch out for brussels. I will be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, March 22, 2013 9:19 AM by Champion

Somebody essentially assist to make severely articles I'd state. That is the very first time I frequented your website page and to this point? I amazed with the research you made to create this actual post extraordinary. Excellent job!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, March 22, 2013 10:55 AM by Polk

Hello, yup this piece of writing is genuinely nice and I have learned lot of things from it on the topic of blogging.

thanks.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Saturday, March 23, 2013 5:01 AM by Close

An impressive share! I've just forwarded this onto a colleague who was conducting a little research on this. And he actually bought me breakfast because I found it for him... lol. So allow me to reword this.... Thanks for the meal!! But yeah, thanks for spending the time to discuss this topic here on your website.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Sunday, March 24, 2013 7:22 AM by Tallent

Greetings! Very useful advice within this post!

It's the little changes which will make the greatest changes. Many thanks for sharing!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Tuesday, March 26, 2013 9:56 PM by Latimer

I got this website from my pal who shared with me about this website

and at the moment this time I am visiting this web site and reading very informative posts here.

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Wednesday, March 27, 2013 3:01 AM by Pannell

That is really fascinating, You're an excessively skilled blogger. I've joined your feed

and sit up for in search of more of your wonderful

post. Additionally, I have shared your web site in my

social networks

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, April 12, 2013 6:16 AM by Pope

Having read this I thought it was rather informative.

I appreciate you spending some time and effort to put this information together.

I once again find myself personally spending a significant amount of time both reading and posting

comments. But so what, it was still worth it!

# re: Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel

Friday, May 10, 2013 10:45 AM by Mariraja

Hi,

Thanks for your article. I am using your code in my MVC3 project. I am getting the following exception in my aspx page,

BinaryWrite exception “OutputStream is not available when a custom TextWriter is used”

in the following line,

Response.OutputStream.Write(bytes, 0, bytes.Length);

Could you help on this issue...?