Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

Render directly to Filesystem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Betina - 28 Jun 2008 17:00 GMT
Hi,

I have a custom program for rendering reports to pdf. When using the render
method of the web service I get a byte array and then i write the data to the
filesystem.

Is there any possibility to render the report directly to the filesystem
without the roundtrip to the client?

Thanks

Betina
Wayne - 01 Jul 2008 15:05 GMT
This is the C# routine that I use:
       private string RenderAsPDF(Microsoft.Reporting.WinForms.ServerReport
Report)
       {
           // this.Text is the name of the report as shown on the form's
caption
           string TempFile = Path.GetTempPath() + this.Text + ".pdf";
           string MimeType;
           string FileExt;

           DeleteFile(TempFile);

           // create an output FileStream for the pdf file. Render the
report to this stream.
           FileStream fs = new FileStream(TempFile,
System.IO.FileMode.Create);
           reportViewer1.ServerReport.Render("PDF", null, null, fs, out
MimeType, out FileExt);
           fs.Close();
           return TempFile;
       }

HTH,
Wayne

> Hi,
>
[quoted text clipped - 8 lines]
>
> Betina
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.