From: Betina on
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

From: Wayne on
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

"Betina" wrote:

> 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
>