views:

9

answers:

0

Hi,

I am using Microsoft ReportViewer (VS2008/VS2010) to generate PDFs on the server. This is the code I use to build my PDF report:

PdfContent = rvEngine.LocalReport.Render("PDF", deviceInfo, mimeType, encoding, filenameExtension, streamids, warnings)

If (PdfContent IsNot Nothing) Then
    Try
        Using fs As FileStream = New FileStream(sFileName, FileMode.CreateNew, FileAccess.Write, FileShare.Write)
            fs.Write(PdfContent, 0, PdfContent.Length)
            fs.Flush()
            fs.Close()
        End Using
        isPDFGenerated = True
    Catch ex As Exception
        ' DO SOMETHING.
    End Try
    PdfContent = Nothing
End If

I would like to specify the number of copies to be printed, so I don't have to work with the stream. Is there anyone who can help me?

Thanks