How to Create Custom Reports for the Admin Dashboard Utility
You want to to view a different report via the Admin Dashboard Utility that returns information in a different configuration than one of the standard 'out-of-the-box' reports included with your PortalGuard Install.
Create a custom report xml to view via the Admin Dashboard Utility
Important Note: This article covers custom reports in PortalGuard version 18.104.22.168 and later. If you have an older version of PortalGuard, please consider upgrading to the latest version or submit a support ticket to request assistance with creating a custom report in your version of PortalGuard.
- Navigate to the PortalGuard server and open the File Explorer
- Navigate to C:\Program Files\PistolStar\PortalGuard\Policies\ReportDefinitions
- Create a new xml file using the following file name format:
The Report Definitions are simple XML files containing the title and SQL query that will be run against the pstar database to generate the actual report.
- the * can be replaced with your chosen file name, but the extension must end in ".report.xml" to be seen by PortalGuard's reporting interface.
Edit the '1 Successful Logins.report.xml' file in Notepad++ or a similar administrative text editor
Edit the 'display' text on line #2 to display your chosen title for the report
Modify the 'query' beginning on line#4 to change what information is pulled from the pstardatabase for the new report.
- As an example, you can edit an existing Report and modify the SQL query to create the new Report Definition.
- In this article, we will use the "Successful Logins" Report as a starting point
For this report, we are going to add a Column which displays the Security Policy used by the user who is logging in via PortalGuard. To do this, we add a new column in the query to return the [PolicyName] data:
After making the change, save the policy with a new name
- Data from reports are typically housed in one of the 3 following database tables:
- Examples of Data that can be pulled from each table can be determined in detail by viewing the table through SQL Server Management Studio
After applying the changes and authenticating to the Admin Dashboard, a new report is available which, when run, shows the security policy used by the users during login:
- Reports appear in the Admin Dashboard in alphabetical order, which is why the default report definition files all begin with a number. The example above has a file name of '0 Successful Logins with Policy.report.xml', which makes it appear first in the Report Dropdown
REV. 08/2018 | PortalGuard