Creating and Editing Reports

There are two ways to create a Report. From the Reports Edit page, click the Add New link at the bottom of a Report Category. Or alternatively, from the Reports View page, click the Create it link at the bottom of that page.

Creating a Custom Report

  1. Click Reports on the main menu. The Reports page appears:

    image-20221020143722550

  2. Click the New Report button. The New Report page appears:

    image-20221020143828410

  3. Type the report name in the Name text box. This is the name that is displayed on the Reports page as a link underneath its containing category.

  4. Type a description in the Description text box. This is displayed in the Report View page. It is also used as the Tooltip for the Report name on the Reports page.

  5. Click the Category dropdown list to select the category the report will appear in on the Reports page.

  6. Click the Page Size dropdown list to select the page size limit for the data displayed in the grid.

  7. Click to select the Use Database Paging check box if desired. See Database Paging.

  8. Click the Chart dropdown list to select the type of chart to use for displaying the results. If set to None, a grid displays.

  9. Paste your script in the Report SQL text box. See Report SQL Scripts.

  10. (optional) Click the Preview button to see your report before creating it.

  11. Click the Save button. The new report's page appears and now appears on the reports page:

Editing Reports

To edit a report:

  1. Click the Reports menu item. The Reports page appears, listing all the reports.

  2. Click the name of the report, which is a link. That report's page appears.

  3. Click the Edit button. The Report Edit page appears. See Creating a Custom Report for details about the parameters.

The SQL script text cannot be edited for non-custom (built-in) reports.

Report SQL Scripts

Overview

The best way to create SQL scripts is to view existing ones and the Secret Server database structure. Click any existing report's link to arrive at its page. Then click the Edit button. The SQL appears in the Report SQL text box.

Even though you are pressing the Edit button, you cannot edit non-custom reports. You can view their parameters, including their SQL script.

Dynamic Parameters

Reports support the embedding of certain parameters into the SQL so you can dynamically change the resulting data set. Another option available for custom reports is to apply a different color to returned rows dependent on certain conditions. For more information as well as examples, see the Using Dynamic Parameters in Reports topic.

Viewing Secret Server SQL Database Information

You can show Secret Server's SQL database information to assist with creating custom reports.

When Creating a Custom Report under the Chart dropdown click Chart and SQL Editor. The Report SQL page appears. Click Help and search for specific tables and drill into them to assist creating custom reports.

By selecting the SQL Table from the list, the details of the table's columns display in a grid. Click the Show Secret Server SQL database information link to see the SQL Table list and SQL Table Columns grid.

You can click Preview button at the bottom of the page to see a preview of the chart. The resulting chart displays in the Report Preview section at the bottom of the page.

Database Paging

Database paging allows the database to load large reports more quickly. We recommend database paging if the query is expected to pull large amounts of data for the report. Implementing database paging may not work if the SQL query uses some keywords, including TOP, OPTION, INSERT, UNION, WITH, or aliases containing the word FROM.

Example queries:

  • Works using database paging: SELECT * FROM tbSecret WHERE NAME LIKE 'Test%'
  • Does not work using database paging: SELECT TOP 10 * FROM tbSecret WHERE SecretName LIKE 'Test%'