Databases Reference
In-Depth Information
parameters, Nothing, Nothing, encoding, mimeType, _
parametersUsed, warnings, streamIds)
'create a file stream to write the output
Dim fileName As String = txtOutputLocation.Text & “\” & reportItem.Name & _
format.Extension
Dim fs As New System.IO.FileStream(fileName, System.IO.FileMode.OpenOrCreate)
Dim writer As New System.IO.BinaryWriter(fs)
writer.Write(data, 0, data.Length)
writer.Close()
fs.Close()
MessageBox.Show((“File written to: “ + fileName))
End Sub
Now that you have completed the code for rendering the application, let's try it out. You need to build
and run the project. When the form opens, enter your server information in the Server Address text box
and click the Get Items button that you can see in Figure 12-11.
Figure 12-11
Select a report that takes parameters, and click the Get Parameters button. Finally, enter the Output
Folder (C:) and the rendering Format as PDF. Once these items have been specified, you can click the
Render button to render your report. When the rendering is complete, you will receive a message box
letting you know that the file has been written to the specified location, as shown in Figure 12-5, earlier
in this chapter.
You can now search for and open your saved file in Adobe Acrobat.
Search WWH ::




Custom Search