Databases Reference
In-Depth Information
Dim result As Byte() = Nothing
'Dim format As String = "PDF"
'Dim format As String = "EXCEL"
Dim format As String = "WORD"
Dim encoding As String = ""
Dim mimetype As String = ""
Dim warnings As Warning() = Nothing
Dim streamIDs As String() = Nothing
'declare ExecuteHeader and ExecuteInfo
Dim executeinfo As New RSExecSVC.ExecSVC.ExecutionInfo
Dim executeHeader As New RSExecSVC.ExecSVC.ExecutionHeader
'load report for execution
executeinfo = svc.LoadReport(repPath, historyID)
Dim SessionID As String = svc.ExecutionHeaderValue.
ExecutionID
'coding the Render() method
result = svc.Render(format, Nothing, extensio, mimetype,
encoding, warnings, streamIDs)
'clear the response
Response.ClearContent()
'add header
Response.AppendHeader("Content-length", result.Length.
ToString)
'set up type of content
'Response.ContentType = "application/pdf"
'Response.ContentType = "application/vnd.ms-excel"
Response.ContentType = "application/msword"
Response.BinaryWrite(result)
Response.Flush()
Response.Close()
End Sub
End Class
13. Build the project and browse to the Default.aspx page.
14. Default.aspx will be displayed in the browser.
15. Click on the button on this page.
 
Search WWH ::




Custom Search