Managed Reporting Functions

In this section:

 

This topic describes WebFOCUS Web Service functions available in Managed Reporting.


Top of page

x
Getting a List of Domains

Function Name: MREGetDomains

Purpose: To retrieve a list of domains that are defined in Managed Reporting. Use the GetUserDomains function to retrieve a list of domains that the user can access.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Getting a List of Domains in Visual Basic .NET

In the following example, a list of domains is retrieved and written to the GetDomains.xml file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String = ""
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREGetDomains(logon)
 
tempfile = "c:\temp\GetDomains.xml"
 
newOutput = retMR.xml
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Getting a List of Domains in Java

In the following example, a list of domains is retrieved and written to the GetDomains.xml file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREGetDomains(logon);
 
String newOutput = retMR.getXml();
 
File tempfile = new File("c:\\temp\\GetDomains.xml");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Getting a List of Domains for a Particular User

Function Name: MREGetUserDomains

Purpose: To retrieve a list of domains that the user can access.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Getting a List of Domains for a Particular User in Visual Basic .NET

In the following example, a list of domains that the user can access is retrieved and written to the GetUserDomains.xml file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String = ""
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "User1", "User1pass")
retMR = wfs.MREGetUserDomains(logon)
 
tempfile = "c:\temp\GetUserDomains.xml"
 
newOutput = retMR.xml
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Getting a List of Domains for a Particular User in Java

In the following example, a list of domains that the user can access is retrieved and written to the GetUserDomains.xml file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = 
wfs.webFocusLogOn("RepUser","RepPass","User1","User1pass");
MREReturn retMR = wfs.MREGetUserDomains(logon);
 
String newOutput = retMR.getXml();
 
File tempfile = new File("c:\\temp\\GetUserDomains.xml");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Getting a List of Groups

Function Name: MREGetGroups

Purpose: To retrieve a list of groups that are defined in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Getting a List of Groups in Visual Basic .NET

In the following example, a list of groups is retrieved and written to the GetGroups.xml file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String = ""
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "User1", "User1pass")
retMR = wfs.MREGetGroups(logon)
 
tempfile = "c:\temp\GetGroups.xml"
 
newOutput = retMR.xml
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Getting a List of Groups in Java

In the following example, a list of groups is retrieved and written to the GetGroups.xml file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon =
wfs.webFocusLogOn("RepUser","RepPass","User1","User1pass");
MREReturn retMR = wfs.MREGetGroups(logon);
 
String newOutput = retMR.getXml();
 
File tempfile = new File("c:\\temp\\GetGroups.xml");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Getting a List of Users

Function Name: MREGetUsers

Purpose: To retrieve a list of users that are defined in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Getting a List of Users in Visual Basic .NET

In the following example, a list of users is retrieved and written to the GetUsers.xml file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String = ""
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "User1", "User1pass")
retMR = wfs.MREGetUsers(logon)
 
tempfile = "c:\temp\GetUsers.xml"
 
newOutput = retMR.xml
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Getting a List of Users in Java

In the following example, a list of users is retrieved and written to the GetUsers.xml file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = 
wfs.webFocusLogOn("RepUser","RepPass","User1","User1pass");
 
MREReturn retMR = wfs.MREGetUsers(logon);
 
String newOutput = retMR.getXml();
 
File tempfile = new File("c:\\temp\\GetUsers.xml");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Creating a New Domain

Function Name: MRECreateDomain

Purpose: To create a new domain in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the domain.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Creating a New Domain in Visual Basic .NET

In the following example, a domain named "New Domain" is created with the return code from the function written to the CreateDomain.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRECreateDomain(logon, "New Domain")
 
tempfile = "c:\temp\CreateDomain.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Creating a New Domain in Java

In the following example, a domain named New Domain is created with the return code from the function written to the CreateDomain.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MRECreateDomain(logon,"New Domain");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\CreateDomain.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Creating a New Group

Function Name: MRECreateGroup

Purpose: To create a new group in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the group.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Creating a New Group in Visual Basic .NET

In the following example, a group named New Group is created with the return code from the function written to the CreateGroup.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRECreateGroup(logon, "New Group")
 
tempfile = "c:\temp\CreateGroup.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Creating a New Group in Java

In the following example, a group named "New Group" is created with the return code from the function written to the CreateGroup.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MRECreateGroup(logon,"New Group");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\CreateGroup.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Creating a New User

Function Name: MRECreateUser

Purpose: To create a new user in Managed Reporting. The user will be created with a role of User.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

User ID.

String

Description of user.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Creating a New User in Visual Basic .NET

In the following example, a user ID named "NewUserid" is created with the return code from the function written to the CreateUser.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRECreateUser(logon, "NewUserid", "New User")
 
tempfile = "c:\temp\CreateUser.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Creating a New User in Java

In the following example, a user ID named NewUserid is created with the return code from the function written to the CreateUser.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MRECreateUser(logon,"NewUserid","New User");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\CreateUser.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Renaming a Domain

Function Name: MRERenameDomain

Purpose: To rename a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the domain to be renamed. You can obtain the HREF in the output of MREGetDomains.

String

New name of the domain.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming a Domain in Visual Basic .NET

In the following example, a domain named "New Domain" is renamed to "Reporting Domain" with the return code from the function written to the RenameDomain.txt file in the c:\temp directory.

The HREF for "New Domain" is obtained from the output of MREGetDomains.

<HREF flgs="none" href="xgzr36o2/xgzr36o2.htm" desc="New Domain" imag="" 
/>
Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRERenameDomain(logon, "xgzr36o2/xgzr36o2.htm", "Reporting 
Domain")
 
tempfile = "c:\temp\RenameDomain.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Renaming a Domain in Java

In the following example, a domain named "New Domain" is renamed to "Reporting Domain" with the return code from the function written to the RenameDomain.txt file in the c:\temp directory.

The HREF for "New Domain" is obtained from the output of MREGetDomains.

<HREF flgs="none" href="xgzr36o2/xgzr36o2.htm" desc="New Domain" imag="" />
try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
 
MREReturn retMR = 
   wfs.MRERenameDomain(logon,"xgzr36o2/xgzr36o2.htm","Reporting Domain");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\RenameDomain.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Setting a Password for a User

Function Name: MREChangeUserPassword

Purpose: To set the password for a particular user ID.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

User ID.

String

New password.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Setting a Password for a User in Visual Basic .NET

In the following example, the password for a user ID named "NewUserid" is set to "NewPass". The return code from the function is written to the ChangeUserPassword.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREChangeUserPassword(logon, "NewUserid", "NewPass")
 
tempfile = "c:\temp\ChangeUserPassword.txt"
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Setting a Password for a User in Java

In the following example, the password for a user ID named "NewUserid" is set to "NewPass". The return code from the function is written to the ChangeUserPassword.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREChangeUserPassword(logon,"NewUserid","NewPass");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\ChangeUserPassword.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Changing User Information

Reference:

Function Name: MRESetUserFlags

Purpose: To rename a user ID, to change the description of a user, or to set flags for a user.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Current user ID.

String

New description of user.

String

New user ID.

String

User flags. Flags are comma-separated. See User Flags Table.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



x
Reference: User Flags Table

The following table describes user flags:

Flag

Description

admin

Indicates the user has Managed Reporting Administrator privileges.

advanced

Indicates the user has the Advanced privilege.

auser

Indicates the Analytic User can save reports and create My Reports.

dadomains=untitled%20salesdom

Indicates this Developer is restricted to administering only the default domain, which has the internal reference "untitled," and the Sales Domain. The characters %20 delimit the domains when there is more than one domain.

dataserver

Indicates the developer has access to the Data Server feature and can set the server and application path properties of a Domain.

domadmin

Indicates the user is a Developer.

email=address

Used with ReportCaster library.

gagroups=group%20group

Indicates the user is a group administrator for the named groups. The characters %20 delimit the groups when there is more than one.

inactive

Indicates the user account is disabled.

is508

Indicates to the Managed Reporting Dashboard user interface to invoke tools and online help that are in compliance with federal Section 508 accessibility regulations. For more information, see Section 508 Accessibility in WebFOCUS in the Developing Reporting Applications manual.

library

User can use ReportCaster Library.

parmrpt

Indicates that a user can save the parameter values entered in a form into a new My Report.

rcadmin

ReportCaster Administrator.

robot

Indicates the user has scheduling privileges.

savemyreports

Indicates an Analytical User can Save My Reports.

shared

Indicates the user can share reports.

user

Cannot use tools; can only run reports.



Example: Changing User Information in Visual Basic .NET

In the following example, a user ID named "NewUserid" is enabled and is given administrative privileges. The return code from the function is written to the SetUserFlags.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRESetUserFlags(logon, "NewUserid", "", "", "active,admin")
 
tempfile = "c:\temp\SetUserFlags.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Changing User Information in Java

In the following example, a user ID named "NewUserid" is enabled and is given administrative privileges. The return code from the function is written to the SetUserFlags.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR =
wfs.MRESetUserFlags(logon,"NewUserid","","","active,admin");
 
int newOutput = retMR.getRc(); 
 
File tempfile = new File("c:\\temp\\SetUserFlags.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Adding a Group to a User

Function Name: MREAddGrouptoUser

Purpose: To add a user to a security group.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

User ID.

String

HREF of the group. You can obtain the HREF in the output of MREGetGroups.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Adding a Group to a User in Visual Basic .NET

In the following example, a user ID named "NewUserid" is made part of "New Group". The return code from the function is written to the AddGrouptoUser.txt file in the c:\temp directory.

The HREF for "New Group" is obtained from the output of MREGetGroups.

<MR_GROUP_FOLDER href="#newgroup" name="newgroup" desc="New Group" />
Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREAddGrouptoUser(logon, "NewUserid", "#newgroup")
 
tempfile = "c:\temp\AddGrouptoUser.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Adding a Group to a User in Java

In the following example, a user ID named "NewUserid" is made part of "New Group". The return code from the function is written to the AddGrouptoUser.txt file in the c:\temp directory.

The HREF for "New Group" is obtained from the output of MREGetGroups.

<MR_GROUP_FOLDER href="#newgroup" name="newgroup" desc="New Group" />
try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREAddGrouptoUser(logon,"NewUserid","#newgroup");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\AddGrouptoUser.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Deleting a Group From a User

Function Name: MREDeleteGroupfromUser

Purpose: To remove a user from a security group.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

User ID.

String

HREF of the group. You can obtain the HREF in the output of MREGetGroups.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Group From a User in Visual Basic .NET

In the following example, a user ID named "NewUserid" is removed from "New Group". The return code from the function is written to the DeleteGroupfromUser.txt file in the c:\temp directory.

The HREF for "New Group" is obtained from the output of MREGetGroups.

<MR_GROUP_FOLDER href="#newgroup" name="newgroup" desc="New Group" /> 
Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREDeleteGroupfromUser(logon, "NewUserid", "#newgroup")
 
tempfile = "c:\temp\DeleteGroupfromUser.txt"
 
newOutput = retMR.rc
 
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Deleting a Group From a User in Java

In the following example, a user ID named "NewUserid" is removed from "New Group". The return code from the function is written to the DeleteGroupfromUser.txt file in the c:\temp directory.

The HREF for "New Group" is obtained from the output of MREGetGroups.

<MR_GROUP_FOLDER href="#newgroup" name="newgroup" desc="New Group" />
try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR =
wfs.MREDeleteGroupfromUser(logon,"NewUserid","#newgroup");
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\DeleteGroupfromUser.txt");
 
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Adding a Domain to a Group

Function Name: MREAddDomaintoGroup

Purpose: To give a group access to a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the group. You can obtain the HREF in the output of MREGetGroups.

String

HREF of the domain. You can obtain the HREF in the output of MREGetDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Adding a Domain to a Group in Visual Basic .NET

In the following example, a group named "New Group" is granted access to the domain named "New Domain". The return code from the function is written to the AddDomaintoGroup.txt file in the c:\temp directory.



Example: Adding a Domain to a Group in Java

In the following example, a group named "New Group" is granted access to the domain named "New Domain". The return code from the function is written to the AddDomaintoGroup.txt file in the c:\temp directory.


Top of page

x
Deleting a Domain From a Group

Function Name: MREDeleteDomainfromGroup

Purpose: To remove a group's access to a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the group. You can obtain the HREF in the output of MREGetGroups.

String

HREF of the domain. You can obtain the HREF in the output of MREGetDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Domain From a Group in Visual Basic .NET

In the following example, the access for a group named "New Group" to a Domain named "New Domain" is removed.

The return code from the function is written to the DeleteDomainfromGroup.txt file in the c:\temp directory.



Example: Deleting a Domain From a Group in Java

In the following example, the access for a group named "New Group" to a Domain named "New Domain" is removed.

The return code from the function is written to the DeleteDomainfromGroup.txt file in the c:\temp directory.


Top of page

x
Deleting a Group

Function Name: MREDeleteGroup

Purpose: To delete a group from Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the group. You can obtain the HREF in the output of MREGetGroups.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Group From Managed Reporting in Visual Basic .NET

In the following example, the group named "New Group" is deleted.

The return code from the function is written to the DeleteGroup.txt file in the c:\temp directory.



Example: Deleting a Group From Managed Reporting in Java

In the following example, the group named "New Group" is deleted.

The return code from the function is written to the DeleteGroup.txt file in the c:\temp directory.


Top of page

x
Deleting a User

Function Name: MREDeleteUser

Purpose: To delete a user from Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

User ID.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a User in Visual Basic .NET

In the following example, a user ID named "NewUserid" is deleted. The return code from the function is written to the DeleteUser.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
  
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREDeleteUser(logon, "NewUserid")
  
tempfile = "c:\temp\DeleteUser.txt"
  
newOutput = retMR.rc
  
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Deleting a User in Java

In the following example, a user ID named "NewUserid" is deleted. The return code from the function is written to the DeleteUser.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
  
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREDeleteUser(logon,"NewUserid");
  
int newOutput = retMR.getRc();
  
File tempfile = new File("c:\\temp\\DeleteUser.txt");
  
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Adding a Standard Reports Folder

Function Name: MRECreateStandardReportFolder

Purpose: To add a Standard Reports folder to a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the Standard Reports folder.

String

Flag for a parent report folder.

Null if it is not a sub-folder.

Flag Format: belongsto=parentfolderHREF

You can obtain the HREF of the parent folder in the output of MREOpenDomain.

For example,

belongsto=#newstandardf

String

HREF of the domain.

You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Adding a Standard Reports Folder in Visual Basic .NET

In the following example, a Standard Reports folder named "New Standard Sub-Folder" is added under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain".

The return code from the function is written to the CreateStandardReportFolder.txt file in the c:\temp directory.



Example: Adding a Standard Reports Folder in Java

In the following example, a Standard Reports folder named "New Standard Sub-Folder" is added under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain".

The return code from the function is written to the CreateStandardReportFolder.txt file in the c:\temp directory.


Top of page

x
Renaming a Standard Reports Folder

Function Name: MRERenameStandardReportFolder

Purpose: To rename a Standard Reports folder within a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Standard Reports folder.

You can obtain the HREFin the output of MREOpenDomain.

String

New name of the Standard Reports folder.

String

HREF of the domain.

You can obtain the HREF in the output of MREGetUserDomains.

String

Flag for a parent report folder. See Adding a Standard Reports Folder.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming a Standard Reports Folder in Visual Basic .NET

In the following example, a Standard Reports folder named "New Standard Sub-Folder" within the domain named "New Domain" is renamed to "Old Standard Sub-Folder".

The return code from the function is written to the RenameStandardReportFolder.txt file in the c:\temp directory.



Example: Renaming a Standard Reports Folder in Java

In the following example, a Standard Reports folder named "New Standard Sub-Folder" within the domain named "New Domain" is renamed to "Old Standard Sub-Folder".

The return code from the function is written to the RenameStandardReportFolder.txt file in the c:\temp directory.


Top of page

x
Deleting a Standard Reports Folder

Function Name: MREDeleteStandardReportFolder

Purpose: To delete a Standard Reports folder within a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Standard Reports folder.

You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the domain.

You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Standard Reports Folder in Visual Basic .NET

In the following example, a Standard Reports folder named "New Standard Sub-Folder" within the domain named "New Domain" is deleted.

The return code from the function is written to the DeleteStandardReportFolder.txt file in the c:\temp directory.



Example: Deleting a Standard Reports Folder in Java

In the following example, a Standard Reports folder named "New Standard Sub-Folder" within the domain named "New Domain" is deleted.

The return code from the function is written to the DeleteStandardReportFolder.txt file in the c:\temp directory.


Top of page

x
Adding a Reporting Objects Folder

Function Name: MRECreateReportingObjectFolder

Purpose: To add a Reporting Objects folder to a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the reporting object.

String

Flag for parent Reporting Objects folder.

Null if it is not a sub-folder.

Flag Format: belongsto=parentfolderHREF

You can obtain the HREF of the parent folder in the output of MREOpenDomain.

For example, belongsto=#newobjectfol

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Adding a Reporting Object Folder in Visual Basic .NET

In the following example, a Reporting Objects folder named "New Object Sub-Folder" is added under the Reporting Objects folder named "New Object Folder" within the domain named "New Domain".

The return code from the function is written to the CreateReportingObjectFolder.txt. file in the c:\temp directory.



Example: Adding a Reporting Object Folder in Java

In the following example, a Reporting Objects folder named "New Object Sub-Folder" is added under the Reporting Objects folder named "New Object Folder" within the domain named "New Domain".

The return code from the function is written to the CreateReportingObjectFolder.txt. file in the c:\temp directory.


Top of page

x
Renaming a Reporting Object Folder

Function Name: MRERenameReportingObjectFolder

Purpose: To rename a Reporting Objects folder within a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Reporting Objects folder.

You can obtain the HREF in the output of MREOpenDomain.

String

New name of the Reporting Objects folder.

String

HREF of the domain.

You can obtain the HREF in the output of MREGetUserDomains.

String

Flag for parent Reporting Objects folder. For details, see Adding a Reporting Objects Folder.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming a Reporting Object Folder in Visual Basic .NET

In the following example, a Reporting Objects folder named "New Object Sub-Folder" within the domain named "New Domain" is renamed to "Old Object Sub-Folder".

The return code from the function is written to the RenameReportingObjectFolder.txt file in the c:\temp directory.



Example: Renaming a Reporting Object Folder in Java

In the following example, a Reporting Objects folder named "New Object Sub-Folder" within the domain named "New Domain" is renamed to "Old Object Sub-Folder".

The return code from the function is written to the RenameReportingObjectFolder.txt file in the c:\temp directory.


Top of page

x
Deleting a Reporting Object Folder

Function Name: MREDeleteReportingObjectFolder

Purpose: To delete a Reporting Objects folder within a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Reporting Objects folder.

You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Reporting Object Folder in Visual Basic .NET

In the following example, a Reporting Objects folder named "New Object Sub-Folder" within the domain named "New Domain" is deleted.

The return code from the function is written to the DeleteReportingObjectFolder.txt file in the c:\temp directory.



Example: Deleting a Reporting Object Folder in Java

In the following example, a Reporting Objects folder named "New Object Sub-Folder" within the domain named "New Domain" is deleted.

The return code from the function is written to the DeleteReportingObjectFolder.txt file in the c:\temp directory.


Top of page

x
Creating a Standard Report

Reference:

Function Name: MRECreateStandardReport

Purpose: To create a Standard Report within a Standard Reports folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the Standard Report.

String

Report flags (comma-separated). See Report Flags Table.

String

HREF of the Standard Reports folder.

You can obtain the HREF in the output of MREOpenDomain.

String

WebFOCUS code.

A CR/LF should follow each line.

String

The file extension of the file to be created.

WebFOCUS reports have a file extension of .fex.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



x
Reference: Report Flags Table

The following table describes report flags.

Flag

Description

hidden

Indicates that the report is hidden from view within the Managed Reporting Domains area.This mainly applies to users and analytical users. Developers can still see these reports in the Domain Builder area. This flag only works within Managed Reporting. The MREOpenDomain function still brings back all reports. The flags are also brought back in the output of this function. Your program can interrogate the flags to determine whether to display the report.

runasolap

Runs the report in OLAP mode within Managed Reporting.

defer

Runs the report in Managed Reporting in deferred execution mode.

skipamper

Does not prompt for parameters in Managed Reporting.

node=servernodename

Identifies the WebFOCUS Reporting Server where the report is to be run.

servernodename is the name of the Reporting Server node as defined in the odin.cfg file.

appname=application

The application that contains the Master File for the report. This is used if the application was not added to the application path in the edasprof.prf file.



Example: Creating a Standard Report in Visual Basic .NET

In the following example, a Standard Report named "New Standard Report" is added under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain".

The report has the following attributes:

The return code from the function is written to the CreateStandardReport.txt file in the c:\temp directory.



Example: Creating a Standard Report in Java

In the following example, a Standard Report named "New Standard Report" is added under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain".

The report has the following attributes:

The return code from the function is written to the CreateStandardReport.txt file in the c:\temp directory.


Top of page

x
Renaming a Standard Report

Function Name: MRERenameStandardReport

Purpose: To rename a Standard Report within a Standard Reports folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Standard Report. You can obtain the HREF in the output of the MREOpenDomain.

String

HREF of the Standard Reports folder. You can obtain the HREF in the output of MREOpenDomain.

String

New name of the Standard Report.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Report flags (comma-separated). See Report Flags Table.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming a Standard Report in Visual Basic .NET

In the following example, a Standard Report named "New Standard Report" is renamed to "Old Standard Report". This report exists under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain". The reporting flags are set to "none".

The return code from the function is written to the RenameStandardReport.txt file in the c:\temp directory.



Example: Renaming a Standard Report in Java

In the following example, a Standard Report named "New Standard Report" is renamed to "Old Standard Report". This report exists under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain". The reporting flags are set to "none".

The return code from the function is written to the RenameStandardReport.txt file in the c:\temp directory.


Top of page

x
Deleting a Standard Report

Function Name: MREDeleteStandardReport

Purpose: To delete Standard Report within a Standard Reports folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Standard Report. You can obtain the HREF in the output of the MREOpenDomain.

String

HREF of the Standard Reports folder. You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Standard Report in Visual Basic .NET

In the following example, a Standard Report named "New Standard Report" is deleted. This report exists under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain".

The return code from the function is written to the DeleteStandardReport.txt file in the c:\temp directory.



Example: Deleting a Standard Report in Java

In the following example, a Standard Report named "New Standard Report" is deleted. This report exists under the Standard Reports folder named "New Standard Folder" within the domain named "New Domain".

The return code from the function is written to the DeleteStandardReport.txt file in the c:\temp directory.


Top of page

x
Creating a Reporting Object

Reference:

Function Name: MRECreateReportingObject

Purpose: To create a reporting object within a Reporting Objects folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the reporting object.

String

Reporting object flags. For valid flags, see Reporting Object Flags Table.

String

HREF of the Reporting Objects folder. You can obtain the HREF in the output of the MREOpenDomain.

String

WebFOCUS code. A CR/LF should follow each line.

String

The file extension of the file to be created.

WebFOCUS Reports have a file extension of .fex.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



x
Reference: Reporting Object Flags Table

The following table describes reporting object flags.

Flag

Description

runasolap

Runs the report in OLAP mode within Managed Reporting.

defer

Runs the report in Managed Reporting in deferred execution mode.

skipamper

Does not prompt for parameters in Managed Reporting.

showasreport

The reporting object will also show within the Standard Reports tab.

showonlyasreport

The reporting object will only also show within the Standard Reports tab.

node=servernodename

Identifies the WebFOCUS Reporting Server where the report is to be run.

servernodename is the name of the Reporting Server node as defined in the odin.cfg file.

appname=application

The application that contains the Master File for the report. This is used if the application was not added to the application path in the edasprof.prf file.



Example: Creating a Reporting Object in Visual Basic .NET

In the following example, a reporting object named "New Reporting Object" is added under the Reporting Objects folder named "New Object Folder" within the domain named "New Domain". The WebFOCUS code includes the Reporting Object template needed by Report Assistant.

The report has the following attributes:

The return code from the function is written to the CreateReportingObject.txt file in the c:\temp directory.



Example: Creating a Reporting Object in Java

In the following example, a reporting object named "New Reporting Object" is added under the Reporting Objects folder named "New Object Folder" within the domain named "New Domain". The WebFOCUS code includes the Reporting Object template needed by Report Assistant.

The report has the following attributes:

The return code from the function is written to the CreateReportingObject.txt file in the c:\temp directory.


Top of page

x
Renaming a Reporting Object

Function Name: MRERenameReportingObject

Purpose: To rename a reporting object within a Reporting Objects folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the reporting object. You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the Reporting Objects folder. You can obtain the HREF in the output of MREOpenDomain.

String

New name of the reporting object.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Reporting object flags. See Reporting Object Flags Table.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming a Reporting Object in Visual Basic .NET

In the following example, a reporting object named "New Reporting Object" is renamed to "Old Reporting Object". This report exists under the Reporting Objects folder named "New Object Folder" within the domain named "New Domain". The reporting object flags are set to "none".

The return code from the function is written to the RenameReportingObject.txt file in the c:\temp directory.



Example: Renaming a Reporting Object in Java

In the following example, a reporting object named "New Reporting Object" is renamed to "Old Reporting Object". This report exists under the Reporting Objects folder named "New Object Folder" within the domain named "New Domain". The reporting object flags are set to "none".

The return code from the function is written to the RenameReportingObject.txt file in the c:\temp directory.


Top of page

x
Deleting a Reporting Object

Function Name: MREDeleteReportingObject

Purpose: To delete a reporting object within a Reporting Objects folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the reporting object. You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the Reporting Objects folder. You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Reporting Object in Visual Basic .NET

In the following example, a reporting object named "New Reporting Object" is deleted. This report exists under the Reporting Objects folder name "New Object Folder" within the domain named "New Domain".

The return code from the function is written to the DeleteReportingObject.txt file in the c:\temp directory.



Example: Deleting a Reporting Object in Java

In the following example, a reporting object named "New Reporting Object" is deleted. This report exists under the Reporting Objects folder name "New Object Folder" within the domain named "New Domain".

The return code from the function is written to the DeleteReportingObject.txt file in the c:\temp directory.


Top of page

x
Creating an Other File

Reference:

Function Name: MRECreateOtherReport

Purpose: To create a file within the Other Files folder.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Name of the Other file.

String

Other file flags (comma-separated). For valid flags, see Other File Flags Table.

String

Text input.

Typically, WebFOCUS code. A CR/LF should follow each line.

String

The file extension of the file to be created.

WebFOCUS reports have a file extension of .fex.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



x
Reference: Other File Flags Table

The following table describes Other file flags.

Flag

Description

runasolap

Runs the report in OLAP mode within Managed Reporting.

skipamper

Does not prompt for parameters in Managed Reporting.

hidden

The file is hidden from view within the Managed Reporting Domains area. This mainly applies to users and analytical users. Developers can still see these reports when in the Domain Builder area. This flag only works within Managed Reporting. The MREOpenDomain function still brings back all files. The flags are also brought back in the output of this function. Your program can interrogate the flags to determine whether to display the file.



Example: Creating an Other File in Visual Basic .NET

In the following example, an Other File named "New Other File" is added within a domain named "New Domain".

The report has the following attributes:

The return code from the function is written to the CreateOtherReport.txt file in the c:\temp directory.



Example: Creating an Other File in Java

In the following example, an Other File named "New Other File" is added within a domain named "New Domain".

The report has the following attributes:

The return code from the function is written to the CreateOtherReport.txt file in the c:\temp directory.


Top of page

x
Renaming an Other File

Function Name: MRERenameOtherReport

Purpose: To rename an Other file within a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Other file. You can obtain the HREF in the output of MREOpenDomain.

String

New name of the Other file.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Other file flags (comma-separated). For valid flags, see Other File Flags Table.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming an Other File in Visual Basic .NET

In the following example, an Other file named "New Other File" is renamed to "Old Other File". This file exists within the domain named "New Domain". The Other file flags are set to "none".

The return code from the function is written to the RenameOtherReport.txt file in the c:\temp directory.



Example: Renaming an Other File in Java

In the following example, an Other file named "New Other File" is renamed to "Old Other File". This file exists within the domain named "New Domain". The Other file flags are set to "none".

The return code from the function is written to the RenameOtherReport.txt file in the c:\temp directory.


Top of page

x
Deleting an Other File

Function Name: MREDeleteOtherReport

Purpose: To delete an Other file within a domain.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the Other file. You can obtain the HREF in the output of MREOpenDomain.

String

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting an Other File in Visual Basic .NET

In the following example, an Other file named "New Other File" is deleted. This file is within the domain named "New Domain".

The return code from the function is written to DeleteOtherReport.txt file in the c:\temp directory.



Example: Deleting an Other File in Java

In the following example, an Other file named "New Other File" is deleted. This file is within the domain named "New Domain".

The return code from the function is written to DeleteOtherReport.txt file in the c:\temp directory.


Top of page

x
Opening a Domain

Function Name: MREOpenDomain

Purpose: To open a domain and obtain a list of all WebFOCUS reports within Standard Reports, Reporting Objects, and Other Files folders.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

HREF of the domain. You can obtain the HREF in the output of MREGetUserDomains.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Opening a Domain in Visual Basic .NET

In the following example, a domain named "New Domain" is opened. The XML output from the function is written to the OpenDomain.xml file in the c:\temp directory.

The HREF for "New Domain" is obtained from the output of MREGetUserDomains:

<HREF flgs="none" href="xgzr36o2/xgzr36o2.htm" desc="New Domain" 
imag="" /> 
  
Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String
Dim tempfile As String 
  
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "NewUserid", 
"UserPass") 
  
retMR = wfs.MREOpenDomain(logon, "xgzr36o2/xgzr36o2.htm") 
  
tempfile = "c:\temp\OpenDomain.xml" 
  
newOutput = retMR.xml 
  
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Opening a Domain in Java

In the following example, a domain named "New Domain" is opened. The XML output from the function is written to the OpenDomain.xml file in the c:\temp directory.

The HREF for "New Domain" is obtained from the output of MREGetUserDomains.

<HREF flgs="none" href="xgzr36o2/xgzr36o2.htm" desc="New Domain" 
imag="" /> 
  
try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap(); 
  
LogOnInfo logon=
wfs.webFocusLogOn("RepUser","RepPass","NewUserid","UserPass");
  
MREReturn retMR = wfs.MREOpenDomain(logon,"xgzr36o2/xgzr36o2.htm");
  
String newOutput = retMR.getXml(); 
  
File tempfile = new File("c:\\temp\\OpenDomain.xml"); 
  
FileOutputStream fos = new 
FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }


Example: Viewing XML Output Generated By MREOpenDomain
<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <ibwfrpc name="MR_OPEN_DOMAIN">
  <RETURN_TYPE_VERSION>1</RETURN_TYPE_VERSION> 
  <DOMAIN_COUNT>33</DOMAIN_COUNT> 
  <MR_HELP flgs="none" href="app/help.htm" size="195" time="1067353378" 
desc="Help" /> 
- <MR_OTHER_SECTION>
  <MR_HREF_PROPERTIES flgs="ddmap" href="app/webservi.kmd" size="42" 
time="1072795840" desc="Web Services Domain" imag="" /> 
  </MR_OTHER_SECTION>
- <MR_STD_REPORT>
- <MR_STD_REPORT_FOLDER flgs="none" href="#newfoldersrf" 
name="newfoldersrf" desc="HR Reports" imag="">
  <MR_HREF_PROPERTIES href="app/centempt.htm" size="1957" 
time="1089656067" desc="centempt" imag="" />
  <MR_HREF_PROPERTIES href="app/hrranknm.fex" size="5151" 
time="1090003822" desc="hrranknM" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/ranking.fex" size="4511" 
time="1089655726" desc="Ranking" imag="" /> 
  </MR_STD_REPORT_FOLDER>
- <MR_STD_REPORT_FOLDER flgs="none" href="#soapadapterk" 
name="soapadapterk" desc="SOAP Adapter" imag="">
  <MR_HREF_PROPERTIES flgs="none" href="app/adhoc.fex" size="385" 
time="1082137354" desc="Adhoc" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/baseball.fex" size="2140" 
time="1089807365" desc="BaseballRoster" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none,appname=soap_adapter"  
href="app/zoh9uv5k.fex" size="2985" time="1088775483" desc="Get Stock 
Quotes" imag="" />
  <MR_HREF_PROPERTIES href="app/gethoros.fex" size="1406" 
time="1072885852" desc="GetHoroscope" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/getplaye.fex" size="1454" 
time="1076538938" desc="GetPlayers" imag="" /> 
  <MR_HREF_PROPERTIES flgs="hidden,appname=soap_adapter" 
href="app/getquote.fex" size="2110" time="1077288824" desc="GetQuote" 
imag="" /> 
<MR_HREF_PROPERTIES href="app/nflnews.fex" size="1439" 
time="1072795646" desc="NFLNews" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/testheb.fex" size="427" 
time="1091544691" desc="TestHeb" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/webfocus.fex" size="593" 
time="1091460016" desc="WebFocusDBInfo" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/g665d93p.fex" size="641" 
time="1091132635" desc="WebFocusFieldValues" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/zl20xysv.fex" size="694" 
time="1091460397" desc="WebFocusGetFexText" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/o0xasxff.fex" size="737" 
time="1091120255" desc="WebFocusListApps" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/r6wao1xy.fex" size="834" 
time="1091468774" desc="WebFocusListFexs" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/tzzw715l.fex" size="582" 
time="1091132843" desc="WebFocusListServers" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/aw0165u3.fex" size="755" 
time="1091469080" desc="WebFocusMasterInfo" imag="" /> 
  <MR_HREF_PROPERTIES flgs="none" href="app/localtim.fex" size="2199" 
time="1091117884" desc="Zip Code Information" imag="" /> 
  </MR_STD_REPORT_FOLDER>
  </MR_STD_REPORT>
- <MR_REPORT_OBJECT>
- <MR_REPORT_OBJECT_FOLDER flgs="none" href="#zipcodejoins" 
name="zipcodejoins" desc="Zip Code Joins" imag="">
<MR_HREF_PROPERTIES flgs="suffix" href="mrv/localtim.fex" size="318" 
time="1093439281" desc="Local Time to Temperature" imag="" /> 
  </MR_REPORT_OBJECT_FOLDER>
  </MR_REPORT_OBJECT>
  <MR_FILE_INFO href="webservi/webservi.htm" size="2782" type="DOMAIN" 
look="0" time="1093439281" /> 
  <MR_GET_USERS 
flgs="admin,shared,rcadmin,robot,library,email=efrem_litwin@ibi.com" 
href="admin.htm" name="admin" desc="Default Administrator" imag="" /> 
- <IBIMR_MYREPORTS_TABLE flgs="none" href="webservi/webservi.htm" 
desc="Web Services">
- <IBIMR_MYREPORTS_TABLE_FOLDER flgs="none" href="#.olapcustomreports" 
desc="Custom Reports" imag="">
  <MR_HREF_PROPERTIES flgs=",myreport,rassist,shared" 
href="admin/haveaquo.fex" size="474" time="1092921850" desc="Have a 
Quote" imag="" />
  <MR_HREF_PROPERTIES flgs="shared" href="admin/testrepo.fex" size="45" 
time="1093384265" desc="Test Report" imag="" /> 
  </IBIMR_MYREPORTS_TABLE_FOLDER>
- <IBIMR_MYREPORTS_TABLE_FOLDER href="#.olapdeferred" desc="Deferred 
Reports" imag="">
  <MR_HREF_PROPERTIES flgs="1093438271,fexinfo=IBIMR_domain
    %3Dwebservi%2Fwebservi.htm%2CIBIMR_folder%3D
    %23soapadapterk%2CIBIMR_fex%3Dapp%2Fgetplaye.fex
    %2CIBIMR_sub_action%3DMR_STD_REPORT%2CIBIC_user%3D
    %2CIBIMR_time%3D1076538938288%2C%2CIBIMR_report_type
    %3D%2CIBIMR_checkboxcount%3D0%2C,"
    href="#2004-08-25-08-30-24cmrpip000012_edaserve" size="0" time="0"
    desc="GetPlayers" imag="" />
<MR_HREF_PROPERTIES flgs="1093017713,fexinfo=IBIMR_domain
    %3Dwebservi%2Fwebservi.htm%2CIBIMR_folder
    %3D%23soapadapterk%2CIBIMR_fex%3Dapp%2Fzoh9uv5k.fex
    %2CIBIMR_sub_action%3DMR_STD_REPORT%2CIBIC_user%3D
    %2CIBIMR_time%3D1088775483508%2C%2CIBIMR_report_type
    %3D%2CIBIMR_checkboxcount%3D0%2CTICKER%3DSIRI%2C,"
    href="#2004-08-20-10-01-08cmrpip000017_edaserve" size="0" time="0"
    desc="Get Stock Quotes" imag="" />
  </IBIMR_MYREPORTS_TABLE_FOLDER>
  </IBIMR_MYREPORTS_TABLE>
  <MR_FILE_INFO 
flgs="admin,shared,rcadmin,robot,library,email=efrem_litwin@ibi.com" 
href="admin.htm" size="4467" type="USER_ID" look="0" time="1093438271" />
  <RETURNCODE>1000</RETURNCODE> 
  </ibwfrpc>

Top of page

x
Running Managed Reporting API Commands

Function Name: MREAPI

Purpose: To run Managed Reporting API commands.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Managed Reporting action.

String

Managed Reporting sub-action.

String

Structure that contains information about the parameters for a WebFOCUS report.

ValuesArrayEntry

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Running Managed Reporting API Commands in Visual Basic .NET

In the following example, FOCUS Code is saved to My Reports within Managed Reporting. The name of the report is Test Report and it is shared. The return code is written to the CreateMyReport.txt file in the c:\temp directory.

Dim wfmre As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
Dim FocCode As String
Dim CRLF As String
Dim FC1 As String
Dim FC2 As String
Dim FC3 As String
Dim FC4 As String
 
Dim Param1 As New MR.ValuesArrayEntry
Dim Param2 As New MR.ValuesArrayEntry
Dim Param3 As New MR.ValuesArrayEntry
Dim Param4 As New MR.ValuesArrayEntry
Dim Param5 As New MR.ValuesArrayEntry
Dim Param6 As New MR.ValuesArrayEntry
Dim Params As Array = Array.CreateInstance(GetType(MR.ValuesArrayEntry), 
6)
 
CRLF = vbCrLf
FC1 = "TABLE FILE CAR"
FC2 = "SUM DEALER_COST"
FC3 = "BY COUNTRY"
FC4 = "END"
FocCode = FC1 + CRLF + FC2 + CRLF + FC3 + CRLF + FC4
 
Param1.name = "IBIMR_folder"
Param1.val = "#.olapcustomreports"
Params(0) = Param1
 
Param2.name = "IBIF_adhocfex"
Param2.val = FocCode
Params(1) = Param2
 
Param3.name = "IBIMR_str1"
Param3.val = "Test Report"
Params(2) = Param3
 
Param4.name = "IBIMR_domain"
Param4.val = "webservi/webservi.htm"
Params(3) = Param4
 
Param5.name = "IBIMR_length"
Param5.val = "-1"
Params(4) = Param5
 
Param6.name = "IBIMR_flags"
Param6.val = "shared"
Params(5) = Param6
 
logon = wfmre.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfmre.MREAPI(logon, "MR_NEW", "MR_MY_REPORT", Params)
 
tempfile = "c:\temp\CreateMyReport.txt"
newOutput = retMR.rc
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Running Managed Reporting API Commands in Java

In the following example, FOCUS Code is saved to My Reports within Managed Reporting. The name of the report is Test Report and it is shared. The return code is written to the CreateMyReport.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
String CRLF = System.getProperty("line.separator");
String FC1 = "TABLE FILE CAR";String FC2 = "SUM DEALER_COST";
String FC3 = "BY COUNTRY";
String FC4 = "END";
String FocCode = FC1 + CRLF + FC2 + CRLF + FC3 + CRLF + FC4;
 
ValuesArrayEntry[] param;
param = new ValuesArrayEntry[6];
 
ValuesArrayEntry param1 = new ValuesArrayEntry();
param1.setName("IBIMR_folder");
param1.setVal("#.olapcustomreports");
param[0] = param1;
 
ValuesArrayEntry param2 = new ValuesArrayEntry();
param2.setName("IBIF_adhocfex");
param2.setVal(FocCode);
param[1] = param2;
 
ValuesArrayEntry param3 = new ValuesArrayEntry();
param3.setName("IBIMR_str1");
param3.setVal("Test Report");
param[2] = param3;
ValuesArrayEntry param4 = new ValuesArrayEntry();
param4.setName("IBIMR_domain");
param4.setVal("webservi/webservi.htm");
param[3] = param4;
 
ValuesArrayEntry param5 = new ValuesArrayEntry();
param5.setName("IBIMR_length");
param5.setVal("-1");
param[4] = param5;
 
ValuesArrayEntry param6 = new ValuesArrayEntry();
param6.setName("IBIMR_flags");
param6.setVal("shared");
param[5] = param6;
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREAPI(logon,"MR_NEW","MR_MY_REPORT",param);
 
int newOutput = retMR.getRc();
 
File tempfile = new File("c:\\temp\\CreateMyReport.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
}
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }

Top of page

x
Retrieving Status of Deferred Reports

Function Name: MREDeferStatus

Purpose: To retrieve the status of all WebFOCUS reports that were submitted in deferred mode for a particular user.

Input:

Description

Type

WebFOCUS cookie information.

LogOnInfo

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

The deferred status information is brought back from WebFOCUS in XML.

MREReturn



Example: Retrieving Status of Deferred Reports in Visual Basic .NET

In the following example, the status of WebFOCUS reports that were submitted in deferred mode is written to the DeferredStatus.xml file in the c:\temp directory.

Dim wfmre As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String
Dim tempfile As String
 
logon = wfmre.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfmre.MREDeferStatus(logon)
 
tempfile = "c:\temp\DeferredStatus.xml"
newOutput = retMR.xml
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Retrieving Status of Deferred Reports in Java

In the following example, the status of WebFOCUS reports that were submitted in deferred mode is written to the DeferredStatus.xml file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
 
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREDeferStatus(logon);
 
String newOutput = retMR.getXml();
 
File tempfile = new File("c:\\temp\\DeferredStatus.xml");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
 
out.println(newOutput);
out.close();
}
catch (Throwable t)
 {
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
 }


Example: Viewing XML Output Generated By MREDeferStatus
<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <ibwfrpc name="MR_DEFER">
  <RETURN_TYPE_VERSION>1</RETURN_TYPE_VERSION>
- <MR_DEFER_CONTROL>
- <DONE>
- <TICKET_INFO flgs="1093017652,fexinfo=IBIMR_domain
    %3Duntitled%2Funtitled.htm%2CIBIMR_folder%3D
    %23financialrep%2CIBIMR_fex%3Dapp%2Fcarmain.fex
    %2CIBIMR_sub_action%3DMR_STD_REPORT%2CIBIC_user%3D
    %2CIBIMR_time%3D1085756821511%2C%2CIBIMR_report_type
    %3D%2CIBIMR_checkboxcount%3D0%2C,"
    href="#2004-08-20-10-01-08cmrpip000015_edaserve"
    desc="Car Main">
  <USER_ID currentId="" submitId="RepUser" /> 
  <DELETE allowed="false" /> 
  <VIEW allowed="false" /> 
  <SAVE allowed="false" /> 
  <PARAMETERS allowed="false" /> 
  <EXPIRES days="25" /> 
  <DOMAIN href="untitled/untitled.htm" /> 
  <OBJTYPE val="MR_STD_REPORT" /> 
  <FOLDER href="#financialrep" /> 
  <FOCEXEC href="app/carmain.fex" /> 
  </TICKET_INFO>
- <TICKET_INFO flgs="1093017681,fexinfo=IBIMR_domain
    %3Duntitled%2Funtitled.htm%2CIBIMR_folder
    %3D%23financialrep%2CIBIMR_fex%3Dapp%2Fcentplac.fex
    %2CIBIMR_sub_action%3DMR_STD_REPORT%2CIBIC_user%3D
    %2CIBIMR_time%3D1083007374600%2C%2CIBIMR_report_type
    %3D%2CIBIMR_checkboxcount%3D0%2CSEL_PERIOD%3D2002%2F06%2C,"
    href="#2004-08-20-10-01-08cmrpip000016_edaserve"
    desc="centpl_actbud">
<USER_ID currentId="" submitId="RepUser" /> 
  <DELETE allowed="false" /> 
  <VIEW allowed="false" /> 
  <SAVE allowed="false" /> 
  <PARAMETERS allowed="false" />
  <EXPIRES days="25" /> 
  <DOMAIN href="untitled/untitled.htm" /> 
  <OBJTYPE val="MR_STD_REPORT" /> 
  <FOLDER href="#financialrep" /> 
  <FOCEXEC href="app/centplac.fex" /> 
  </TICKET_INFO>
- <TICKET_INFO flgs="1093017713,fexinfo=IBIMR_domain
    %3Dwebservi%2Fwebservi.htm%2CIBIMR_folder
    %3D%23soapadapterk%2CIBIMR_fex%3Dapp
    %2Fzoh9uv5k.fex%2CIBIMR_sub_action%3DMR_STD_REPORT
    %2CIBIC_user%3D%2CIBIMR_time%3D1088775483508%2C
    %2CIBIMR_report_type%3D%2CIBIMR_checkboxcount%3D0
    %2CTICKER%3DSIRI%2C,"
    href="#2004-08-20-10-01-08cmrpip000017_edaserve"
    desc="Get Stock Quotes">
  <USER_ID currentId="" submitId="RepUser" /> 
  <DELETE allowed="false" />
  <VIEW allowed="false" /> 
  <SAVE allowed="false" /> 
  <PARAMETERS allowed="false" />
  <EXPIRES days="25" /> 
  <DOMAIN href="webservi/webservi.htm" />
  <OBJTYPE val="MR_STD_REPORT" /> 
  <FOLDER href="#soapadapterk" /> 
  <FOCEXEC href="app/zoh9uv5k.fex" /> 
  </TICKET_INFO>
  </DONE>
  <RUNNING /> 
- <QUEUED>
- <TICKET_INFO flgs="1093438271,fexinfo=IBIMR_domain
    %3Dwebservi%2Fwebservi.htm%2CIBIMR_folder%3D
    %23soapadapterk%2CIBIMR_fex%3Dapp%2Fgetplaye.fex
    %2CIBIMR_sub_action%3DMR_STD_REPORT%2CIBIC_user%3D
    %2CIBIMR_time%3D1076538938288%2C%2CIBIMR_report_type
    %3D%2CIBIMR_checkboxcount%3D0%2C,"
    href="#2004-08-25-08-30-24cmrpip000012_edaserve"
    desc="GetPlayers">
  <USER_ID currentId="" submitId="RepUser" /> 
  <DELETE allowed="false" /> 
  <VIEW allowed="false" /> 
  <SAVE allowed="false" /> 
  <PARAMETERS allowed="false" /> 
  <EXPIRES days="29" /> 
  <DOMAIN href="webservi/webservi.htm" /> 
  <OBJTYPE val="MR_STD_REPORT" /> 
  <FOLDER href="#soapadapterk" /> 
  <FOCEXEC href="app/getplaye.fex" /> 
  </TICKET_INFO>
  </QUEUED>
  <UNKNOWN /> 
  </MR_DEFER_CONTROL>
  <RETURNCODE>1000</RETURNCODE> 
  </ibwfrpc>

Top of page

x
Creating a New Role

Function Name: MRECreateRole

Purpose: To create a new role in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information

LogOnInfo

Role Name

String

Role Description

String

Base Role

Valid values:

  • admin – MR Administrator
  • domadamin – Developer
  • auser – Analytical User
  • user – User

String

Required Properties

Properties that are defined for the Role and cannot be changed at the User level.

Property flags are comma-separated. For more information see User Flags Table.

String

Optional Properties

Properties that are available for selection at the User level.

Property flags are comma-separated. For more information see User Flags Table.

String

Role Properties

Properties that are defined for the Role and can be deselected at the User level. Property flags are comma-separated.For more information see User Flags Table.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Creating a New Role in Visual Basic .NET

In the following example, a role named "myNewRole" is created with a Base Role of Developer and with privileges of Scheduling reports and saving to My Reports. The available privileges for selection at a User Level are Scheduling Reports, Report Library access, saving Report parameters, and Sharing My Reports. The return code from the function is written to the CreateRole.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
 
retMR = wfs.MRECreateRole(logon, _"myNewRole", _"New Demo Role", _
        "domadmin", _"savemyreport", _"library,parmrpt,shared,robot", _
        "robot")
tempfile = "c:\temp\CreateRole.txt"
newOutput = retMR.rc
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Creating a New Role in Java

In the following example, a role named "myNewRole" is created with a Base Role of Developer and with privileges of Scheduling reports and saving to My Reports. The available privileges for selection at a User Level are Scheduling Reports, Report Library access, saving Report parameters, and Sharing My Reports. The return code from the function is written to the CreateRole.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MRECreateRole(logon,"myNewRole","New Demo Role",
                  "domadmin","savemyreport",
                  "library,parmrpt,shared,robot","robot");
int newOutput = retMR.getRc();
File tempfile = new File("c:\\temp\\CreateRole.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
}
catch (Throwable t)
       System.err.println(t);
       .printStackTrace();
       System.exit(1);
}

Top of page

x
Renaming a Role

Function Name: MRERenameRole

Purpose: To modify the properties for a role in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information

LogOnInfo

HREF of the Role

You can obtain the HREF in the output of MREGetRoles.

String

Role Name

String

Role Description

String

Base Role

valid values:

  • admin – MR Administrator
  • domadamin – Developer
  • auser – Analytical User
  • user – User

String

Required Properties

Properties that are defined for the Role and cannot be changed at the User level.

Property flags are comma-separated. For more information see User Flags Table.

String

Optional Properties

Properties that are available for selection at the User level.

Property flags are comma-separated. For more information see User Flags Table.

String

Role Properties

Properties that are defined for the Role and can be deselected at the User level. Property flags are comma-separated.For more information see User Flags Table.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Renaming a Role in Visual Basic.NET

In the following example, the properties for a role named "myNewRole" are modified with a Base Role of Developer and with a privilege of saving to My Reports. The available privileges for selection at a User Level are Scheduling Reports, Report Library access, saving Report parameters, and Sharing My Reports. The return code from the function is written to the RenameRole.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRERenameRole(logon, _"#mynewrole", _"myNewRole", _
        "New Demo Role", _"domadmin", _"savemyreport", _
        "library,parmrpt,shared,robot", _"")
tempfile = "c:\temp\RenameRole.txt"
newOutput = retMR.rc
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Renaming a Role in Java

In the following example, the properties for a role named "myNewRole" are modified with a Base Role of Developer and with a privilege of saving to My Reports. The available privileges for selection at a User Level are Scheduling Reports, Report Library access, saving Report parameters, and Sharing My Reports. The return code from the function is written to the RenameRole.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MRERenameRole(logon,"#mynewrole","myNewRole",
                  "New Demo Role","domadmin","savemyreport",
                  "library,parmrpt,shared,robot","");
int newOutput = retMR.getRc();
File tempfile = new File("c:\\temp\\RenameRole.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
{
 System.err.println(t);
 t.printStackTrace();
 System.exit(1);
}

Top of page

x
Deleting a Role

Function Name: MREDeleteRole

Purpose: To delete a role from Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information

LogOnInfo

HREF of the Role

You can obtain the HREF in the output of MREGetRoles.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Deleting a Role in Visual Basic.NET

In the following example, a role named "myNewRole" is deleted from Managed Reporting. The return code from the function is written to the DeleteRole.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREDeleteRole(logon, _"#mynewrole")
tempfile = "c:\temp\DeleteRole.txt"
newOutput = retMR.rc
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Deleting a Role in Java

In the following example, a role named "myNewRole" is deleted from Managed Reporting. The return code from the function is written to the DeleteRole.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREDeleteRole(logon,"#mynewrole");
int newOutput = retMR.getRc();
File tempfile = new File("c:\\temp\\DeleteRole.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
{
 System.err.println(t);
 .printStackTrace();
 System.exit(1);
}

Top of page

x
Getting a List of Roles

Function Name: MREGetRoles

Purpose: To retrieve a list of roles that are defined in Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information

LogOnInfo

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Getting a List of Roles in Visual Basic.NET

In the following example, a list of roles are retrieved and written to the GetRoles.xml file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As String
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MREGetRoles(logon)
tempfile = "c:\temp\GetRoles.xml"
newOutput = retMR.xml
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1)

Note: MR is the name of the Web Reference.



Example: Getting a List of Roles in Java

In the following example, a list of roles are retrieved and written to the GetRoles.xml file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MREGetRoles(logon);
String newOutput = retMR.getXml();
File tempfile = new File("c:\\temp\\GetRoles.xml");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
{
System.err.println(t);
t.printStackTrace();
System.exit(1);
}


Example: XML Output Generated By MREGetRoles
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <ibwfrpc name="MR_GET_ROLES">
  <RETURN_TYPE_VERSION>1</RETURN_TYPE_VERSION> 
- <MR_GET_ROLES>
  <MR_ROLE href="#AnalyticalUser" name="Analytical User" 
    properties="savemyreport" 
    optProps="advanced,is508,library,parmrpt,robot,savemyreport,shared" 
    roleFlag="auser" desc="Analytical User" />
  <MR_ROLE href="#ContentManager" name="Content Manager" 
    properties="advanced,dataserver,savemyreport,shared" 
    optProps="advanced,dataserver,is508,library,parmrpt,
     robot,savemyreport,shared" roleFlag="domadmin" 
    desc="Content Manager" fixedProps="savemyreport" />
  <MR_ROLE href="#Developer" name="Developer" 
    optProps="advanced,dataserver,is508,library,parmrpt,robot,shared" 
    roleFlag="domadmin" desc="Developer" fixedProps="savemyreport" />
  <MR_ROLE href="#MRAdministrator" name="MR Administrator" 
    optProps="library,parmrpt,robot,shared,rcadmin" roleFlag="admin"
    desc="MR Administrator" fixedProps="advanced,dataserver,savemyreport" 
/>
  <MR_ROLE href="#myadministrator" name="MyAdministrator" 
    optProps="parmrpt,shared,rcadmin,robot,library" roleFlag="admin"
    desc="MyAdministrator" fixedProps="advanced,dataserver,savemyreport" 
/>
  <MR_ROLE href="#myuser" name="MyUser" optProps="is508,library" 
roleFlag="user" desc="MyUser" />
  <MR_ROLE href="#PowerUser" name="Power User" 
    properties="advanced,savemyreport,shared" 
    optProps="advanced,is508,library,parmrpt,robot,savemyreport,shared" 
    roleFlag="auser" desc="Power User" />
  <MR_ROLE href="#RunOnlyUser" name="Run Only User" 
optProps="is508,library,parmrpt" roleFlag="auser" desc="Run Only User" /> 
  <MR_ROLE href="#User" name="User" optProps="is508,library,parmrpt" 
roleFlag="user" desc="User" />
  </MR_GET_ROLES>
  <RETURNCODE>1000</RETURNCODE> 
  </ibwfrpc>

Top of page

x
Assigning a Role to a User

Function Name: MRESetUserRole

Purpose: To assign a role to a specific User within Managed Reporting.

Input:

Description

Type

WebFOCUS cookie information

LogOnInfo

User Id

String

HREF of the Role

You can obtain the HREF in the output of MREGetRoles.

String

Output:

Description

Type

Structure that contains XML for various Managed Reporting functions.

MREReturn



Example: Assigning a Role to a User in Visual Basic.NET

In the following example, a role named "myNewRole" is assigned to userid "newuser". The return code from the function is written to the SetUserRole.txt file in the c:\temp directory.

Dim wfs As New MR.WebFocus
Dim logon As New MR.LogOnInfo
Dim retMR As New MR.MREReturn
Dim newOutput As Integer
Dim tempfile As String
 
logon = wfs.WebFocusLogOn("RepUser", "RepPass", "admin", "")
retMR = wfs.MRESetUserRole(logon, "newuser", "#mynewrole")
tempfile = "c:\temp\SetUserRole.txt"
newOutput = retMR.rc
FileOpen(1, tempfile, OpenMode.Output)
Print(1, newOutput)
FileClose(1) 

Note: MR is the name of the Web Reference.



Example: Assigning a Role to a User in Java

In the following example, a role named "myNewRole" is assigned to userid "newuser". The return code from the function is written to the SetUserRole.txt file in the c:\temp directory.

try {
WebFocus WFservice = new WebFocusLocator();
WebFocusSoap_PortType wfs = WFservice.getWebFocusSoap();
LogOnInfo logon = wfs.webFocusLogOn("RepUser","RepPass","admin","");
MREReturn retMR = wfs.MRESetUserRole(logon,"newuser","#mynewrole");
int newOutput = retMR.getRc();
File tempfile = new File("c:\\temp\\SetUserRole.txt");
FileOutputStream fos = new FileOutputStream(tempfile);
PrintWriter out=new PrintWriter(fos);
out.println(newOutput);
out.close();
    }
catch (Throwable t)
{
System.err.println(t);
t.printStackTrace();
System.exit(1);
}

WebFOCUS