Focal Point
Web Services/VB.Net

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7211068331

May 20, 2005, 04:36 PM
<Scott Peterson>
Web Services/VB.Net
I am trying to execute a Webfocus Fex from a VB.Net or ASP.Net application. I was able to create the WSDL file and generate a .vb file with Visual Studio. Where I am having problems is understanding how to actually run the .fex file. I would assume I need to call the "WebFocusLogon" function in the .vb file and somehow put this information in a structure that can be passed into the "WebfocusRunFex" function which requires a IBIWS_cookie and a IBIWS_fexinfo parameter. If someone could explain or show me an example I would really appreciate it.
Thanks.
May 20, 2005, 09:29 PM
jsmark
From the manual:

Example Running a WebFOCUS Report in Visual Basic .NET - Single Select
In the following example, the output of a WebFOCUS report named Sales_Report_2 is
written to a file in the c:\temp directory if a format of HTML is specified in the FMT
parameter of the report. If a format of EXL2K is specified, output is written to the
Sales_Report_2.xls file in the c:\temp directory. The other parameter for this report is
REGION.
Dim wfs As New SelfServe.WebFocus
Dim logon As New SelfServe.LogOnInfo
Dim ret As New SelfServe.WebFocusReturn
Dim report As New SelfServe.FexInfo
Dim param1 As New SelfServe.ValuesArrayEntry
Dim param2 As New SelfServe.ValuesArrayEntry
Dim params As Array =
Array.CreateInstance(GetType(SelfServe.ValuesArrayEntry), 2)
Dim newOutput As String = ""
Dim tempfile As String
param1.name = "REGION"
param1.val = "EASTERN"
params(0) = param1
param2.name = "FMT"
param2.val = "HTML"
params(1) = param2
report.server = "EDASERVE"
report.app = "Sales_Demo"
report.name = "Sales_Report_2"
report.IBIWS_arrayvalues = params
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "", "")
ret = wfs.WebFocusRunFex(logon, report)
newOutput = ret.output
If ret.mime = "application/vnd.ms-excel" Then
tempfile = "c:\temp\Sales_Report_2.xls"
Else : tempfile = "c:\temp\Sales_Report_2.htm"
End If
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)
SelfServe is the name of the Web Reference.