I'm trying to Export a RDLC report into a PDF file so I can email it as an attachment.
My issue is that I get A required privilege is not held by the client error in the following code.
On this line Dim fs As New FileStream("C:\TEST", FileMode.Create)
I Have Administrator
Privileged on a Vista Machine.
Dim warnings As Warning() = Nothing
Dim streamids As String() = Nothing
Dim mimeType As String = Nothing
Dim encoding As String = Nothing
Dim extension As String = Nothing
Dim bytes As Byte()
Dim deviceInf As String
deviceInf = "<DeviceInfo><PageHeight>8.5in</PageHeight><PageWidth>11in</PageWidth></DeviceInfo>"
bytes = ReportViewer1.LocalReport.Render("PDF", deviceInf, mimeType, encoding, extension, streamids, warnings)
Dim fs As New FileStream("C:\TEST", FileMode.Create)
fs.Write(bytes, 0, bytes.Length)
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?