Thanks Squatch. That seems to be what I'm looking for. I'd like to see your actual VB code though. Mine seems to run the report just fine since I can see the agent start in the Reporting Console workspace, but I get an exception thrown on the very last line of code where the browser is supposed to open.
Here is my code:
Imports System.IO
Imports System.Net
Imports System.Text
Module Module1
Private cookies As CookieContainer
Private postData As String
Public WebBrowser As New Object
Public Property DocumentText As String
Sub Main()
Dim request2 As HttpWebRequest
Dim response2 As HttpWebResponse
Dim webStream2 As Stream
Dim webResponse2 As String = ""
request2 = WebRequest.Create("https://webfocus.simplot.com/ibi_apps/rs/ibfs/WFC/Repository/food_group/Customer_Service/Open_Orders.fex")
request2.UseDefaultCredentials = True
request2.PreAuthenticate = True
request2.Credentials = CredentialCache.DefaultCredentials
request2.Method = "POST"
'cookies is defined as CookieContainer in the Signing-On to WebFOCUS example
request2.CookieContainer = cookies
postData = "IBIRS_action=run"
Dim byteArray2 As Byte() = Encoding.UTF8.GetBytes(postData)
request2.ContentType = "application/x-www-form-urlencoded"
request2.ContentLength = byteArray2.Length
Dim dataStream2 As Stream = request2.GetRequestStream()
dataStream2.Write(byteArray2, 0, byteArray2.Length)
dataStream2.Close()
response2 = request2.GetResponse()
webStream2 = response2.GetResponseStream()
Dim webStreamReader2 As New StreamReader(webStream2)
While webStreamReader2.Peek >= 0
webResponse2 = webStreamReader2.ReadToEnd()
End While
WebBrowser.DocumentText = webResponse2
End Sub
End Module
WebFOCUS 8
Windows, All Outputs