Use the Report SQL Statement dialog box in Configuration Manager 2007 to specify the SQL statement for the report. When the report runs, Configuration Manager retrieves data from the site server database using the configured SQL statement. Reports can have simple SQL statements or very complex ones that prompt the user for information, join several Microsoft SQL Server views, and use filters to limit the results.
The Report SQL Statement dialog box contains the following elements:
- Displays the Configuration Manager SQL views that can be added to the SQL statement. To insert a view into the SQL statement, click the location to insert the SQL view within the SQL statement, select the view from the Views list, and then click Insert.
- Displays the columns for a view that is highlighted in the Views list. To add a filter to the SQL statement with a column value, click the location to insert the SQL view within the SQL statement, select the view from the Views list, select the column from the Columns list, and then click Values. Choose the values from the Column Values dialog box, and click OK.
- SQL statement
- Specifies the SQL statement for the report. The SQL statement can be modified within the text box, views and column values can be added to the SQL statement by using the Views and Columns lists, or the SQL statement can be modified by using Query Designer in SQL Server 2005. For more information, see How to Modify the Report SQL Statement.
- Specifies that the SQL view highlighted in the Views list is inserted into the SQL statement at the last position of the cursor. The SQL view is inserted at the start of the SQL statement if the cursor position was not selected.
- Opens the Column Values dialog box, where a value for the column highlighted in the Columns list can be selected. For more information about selecting a column value, see Column Values Dialog Box.
- Opens the Prompts dialog box, where prompts can be specified for the report. When a report runs, the prompt will request a value from the user and then use that value to limit the retrieved data. For more information, see About Report Prompts.
- Saves the changes, and exits the dialog box.
- Exits the dialog box without saving any changes.
- Opens the help topic for this tab of the dialog box.