Applicable Versions: 5.00.0038 Onwards


The ClientConfig object exposes the GetPublishedContent method that returns a PublishedContentCollection object containing a PublishedContent object for each report, query or dashboard published to a particular category. 


The PublishedContent object contains the following properties;


PropertyDescription
AuthorGets the name of the author who created this published content.
AutoRefreshGets a value that indicates if this published content will be refreshed automatically on the server.
CommentsGets any comments associated with this published content.
ContentTypeGets a value that indicates the type of content.
DescriptionGets the description of this published content.
IDGets the unique identifier for this published content
KeywordsGets any keywords associated with this published content.
LastUpdatedGets the date this content was last refreshed by the server.
TitleGets the title for this published content
URLParametersGets a string representing the URL parameters string required to render this content.


The following code shows how to use the above objects and methods to display a list of categories and their contents. (NB For the sake of simplicity, the following code does not account for sub categories).


Progress ABL Syntax

DEFINE VARIABLE chClientConfig AS COM-HANDLE NO-UNDO.
CREATE ""DataPAClientConfig.ClientConfig"" chClientConfig.
chClientConfig:Initialise_2().

DEFINE VARIABLE chServerSecurity AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE cGUID AS CHARACTER NO-UNDO.
chServerSecurity = chClientConfig:ServerSecurity(INPUT-OUTPUT cGUID).
DEFINE VARIABLE ix AS INTEGER NO-UNDO.
REPEAT WITH ix = 1 TO chServerSecurity:Categories:Count:
  DEFINE VARIABLE chCategory AS COM-HANDLE NO-UNDO.
  DEFINE VARIABLE MessageText AS CHARACTER NO-UNDO.
  chCategory = chServerSecurity:Categories:Item(ix).
  MessageText = ""CATEGORY: "" + chCategory:Name + CHR(10).
  DEFINE VARIABLE chPublishedContentCollection AS COM-HANDLE NO-UNDO.
  chPublishedContentCollection = chClientConfig:GetPublishedContent(chCategory, FALSE).
  DEFINE VARIABLE iy AS INTEGER NO-UNDO.
  REPEAT WITH iy = 1 TO chPublishedContentCollection:Count:
    DEFINE VARIABLE chPublishedContent AS COM-HANDLE NO-UNDO.
    chPublishedContent = chPublishedContentCollection:Item(iy).
    MessageText = Messagetext + chPublishedContent:Title + CHR(10).
  END.
  MESSAGE MessageText VIEW-AS ALERT-BOX.
END.

Progress GUI for .NET Syntax

DEFINE VARIABLE ClientConfig AS DataPAClientConfig.ClientConfig NO-UNDO.
ClientConfig = NEW DataPAClientConfig.ClientConfig().
ClientConfig:Initialise().

DEFINE VARIABLE ServerSecurity AS DataPAServerSecurity.ServerSecurity NO-UNDO.
DEFINE VARIABLE cGUID AS CHARACTER NO-UNDO.
ServerSecurity = ClientConfig:ServerSecurity(INPUT-OUTPUT cGUID).
DEFINE VARIABLE ix AS INTEGER NO-UNDO.
REPEAT WITH ix = 1 TO ServerSecurity:Categories:Count:
  DEFINE VARIABLE Category AS DataPAServerSecurity.Category NO-UNDO.
  DEFINE VARIABLE MessageText AS CHARACTER NO-UNDO.
  Category = ServerSecurity:Categories:Item[ix].
  MessageText = ""CATEGORY: "" + Category:Name + CHR(10).
  DEFINE VARIABLE PublishedContentCollection AS DataPAClientConfig.PublishedContentCollection NO-UNDO.
  PublishedContentCollection = ClientConfig:GetPublishedContent(Category, FALSE).
  DEFINE VARIABLE iy AS INTEGER NO-UNDO.
  REPEAT WITH iy = 1 TO PublishedContentCollection:Count:
    DEFINE VARIABLE PublishedContent AS DataPAClientConfig.PublishedContent NO-UNDO.
    PublishedContent = PublishedContentCollection:Item[iy].
    MessageText = Messagetext + PublishedContent:Title + CHR(10).
  END.
  MESSAGE MessageText VIEW-AS ALERT-BOX.
END.


VB.NET Syntax

Dim ClientConfig As New DataPAClientConfig.ClientConfig
ClientConfig.Initialise()

For Each Category As DataPAServerSecurity.Category In ClientConfig.ServerSecurity.Categories
  Dim DisplayString As String = ""CATEGORY: "" + Category.Name + vbCrLf
  Dim PublishContent As DataPAClientConfig.PublishedContentCollection = ClientConfig.GetPublishedContent(Category)
  For Each Content As DataPAClientConfig.PublishedContent In PublishContent
    DisplayString = DisplayString + Content.Title + vbCrLf
  Next
  MsgBox(DisplayString)
Next