Report Groups
- The GetReportNames Function returns a list of the Report Groups.
- Returns Empty String Array if service is not reachable.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string ErrorString = "";
string[] Groups = null;
Groups = oasc.GetReportNames(networknode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (string Group in Groups)
{
Console.WriteLine(Group);
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ErrorString As String = ""
Dim Groups As String() = Nothing
Groups = oasc.GetReportNames(networknode, ErrorString)
If ErrorString = "Success" Then
For Each Group As String In Groups
Console.WriteLine(Group)
Next
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The AddReportGroup Function adds a Report Group to the existing Report configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the Group already exists or adding the Group failed.
- Group is the name of the Group to add.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string reportgroup = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
ResultInt32 = oasc.AddReportGroup(reportgroup, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Group successfully added.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim reportgroup As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
ResultInt32 = oasc.AddReportGroup(reportgroup, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Group successfully added.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The RemoveReportGroup Function removes a Report Group from the existing Report configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the Group does not exist or removing the Group failed.
- Group is the name of the Group to remove.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string reportgroup = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
ResultInt32 = oasc.RemoveReportGroup(reportgroup, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Group successfully removed.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim reportgroup As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
ResultInt32 = oasc.RemoveReportGroup(reportgroup, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Group successfully removed.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The GetReportParameterStrings Function returns an array of Strings containing all property types available for each Report Group.
- Returns Empty String Array if service is not reachable.
- Returns a String Array of property types for all possible Parameters for a Report Group.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string[] Parameters = null;
Parameters = oasc.GetReportParameterStrings(networknode);
foreach (string Parameter in Parameters)
{
Console.WriteLine(Parameter);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim Parameters As String() = Nothing
Parameters = oasc.GetReportParameterStrings(networknode)
For Each Parameter As String In Parameters
Console.WriteLine(Parameter)
Next
End Sub
End Class
End Namespace
- The GetReport_Parameter_Value Function returns an object value for the Report Group and Parameter specified.
- Returns nothing if service is not reachable.
- Parameter is a String of the Parameter Type desired of the Report Group.
- Group is a String of the Report Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string reportgroup = "";
string parameter = "";
object ResultObject = null;
string ErrorString = "";
ResultObject = oasc.GetReport_Parameter_Value(parameter, reportgroup, networknode, ref ErrorString);
if (ErrorString == "Success")
{
try
{
Console.WriteLine(ResultObject.ToString());
}
catch
{
Console.WriteLine("Error converting value to string.");
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Private Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim reportgroup As String = ""
Dim parameter As String = ""
Dim ResultObject As Object = Nothing
Dim ErrorString As String = ""
ResultObject = oasc.GetReport_Parameter_Value(parameter, reportgroup, networknode, ErrorString)
If ErrorString = "Success" Then
Try
Console.WriteLine(ResultObject.ToString())
Catch
Console.WriteLine("Error converting value to string.")
End Try
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The GetReport_Parameter_Values Function returns an array of object values for the Report Group specified.
- The order of the array corresponds with the GetReportParameterStrings Function order.
- Returns empty array if service is not reachable.
- Group is a String of the Report Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string ResultString = null;
string reportgroup = "";
string ErrorString = "";
object[] ResultObjects = oasc.GetReport_Parameter_Values(reportgroup, networknode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (object ResultObject in ResultObjects)
{
try
{
if (ResultObject == null)
{
ResultString = "";
}
else
{
ResultString = ResultObject.ToString();
}
Console.WriteLine(ResultString);
}
catch
{
Console.WriteLine("Error Converting Object");
}
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Private Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ResultString As String = Nothing
Dim reportgroup As String = ""
Dim ErrorString As String = ""
Dim ResultObjects As Object() = oasc.GetReport_Parameter_Values(reportgroup, networknode, ErrorString)
If ErrorString = "Success" Then
For Each ResultObject As Object In ResultObjects
Try
If ResultObject Is Nothing Then
ResultString = ""
Else
ResultString = ResultObject.ToString()
End If
Console.WriteLine(ResultString)
Catch
Console.WriteLine("Error Converting Object")
End Try
Next
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The SetReport_Parameter_Value Function sets an object value for the Report Group and Parameter specified.
- Returns -1 if service is not reachable.
- Returns 0 if the Group does not exist or the value did not get set correctly.
- Returns 1 if the function was successful.
- Parameter is a String of the Parameter Type desired of the Report Group.
- Value is the desired value to set.
- Group is a String of the Report Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
string parameter = "";
string valuetoset = "";
string reportgroup = "";
ResultInt32 = oasc.SetReport_Parameter_Value(parameter, valuetoset, reportgroup, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Parameter Successfully Updated.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Private Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
Dim parameter As String = ""
Dim valuetoset As String = ""
Dim reportgroup As String = ""
ResultInt32 = oasc.SetReport_Parameter_Value(parameter, valuetoset, reportgroup, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Parameter Successfully Updated.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The SaveReportConfiguration Subroutine saves the current Report configuration to the specified file path.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string ErrorString = "";
string filepath = "";
oasc.SaveReportConfiguration(filepath, networknode, ref ErrorString);
if (ErrorString != "Success")
{
Console.WriteLine(ErrorString);
}
else
{
Console.WriteLine("Saved");
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Private Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ErrorString As String = ""
Dim filepath As String = ""
oasc.SaveReportConfiguration(filepath, networknode, ErrorString)
If ErrorString <> "Success" Then
Console.WriteLine(ErrorString)
Else
Console.WriteLine("Saved")
End If
End Sub
End Class
End Namespace
The LoadReportConfiguration Subroutine saves the current Report configuration to the specified file path.
NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string ErrorString = "";
string filepath = "";
oasc.LoadReportConfiguration(filepath, networknode, ref ErrorString);
if (ErrorString != "Success")
{
Console.WriteLine(ErrorString);
} else
{
Console.WriteLine("Loaded");
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Private Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ErrorString As String = ""
Dim filepath As String = ""
oasc.LoadReportConfiguration(filepath, networknode, ErrorString)
If ErrorString <> "Success" Then
Console.WriteLine(ErrorString)
Else
Console.WriteLine("Loaded")
End If
End Sub
End Class
End Namespace