Reports in Configuration Manager 2007 can be based on 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. Use the following procedure to modify the SQL statement that is used in a report.
Procedure
How to modify the SQL statement in a report
-
In the Configuration Manager console, navigate to System Center Configuration Manager / Site Database / Computer Management / Reporting / Reports.
-
Right-click the report of your choice, and then click Properties.
-
Click Edit SQL Statement to open the Report SQL Statement dialog box. The SQL statement for the report is listed in the SQL Statement pane.
-
The SQL statement must be typed into the SQL statement text box. However, you can add a new view or column value to the SQL statement as follows:
Add a SQL view:
- Click the location within the SQL statement to insert the new
view.
- Select a view from the View list, and then click
Insert.
Add a column value:
- Click the location within the SQL statement to insert the new
column value.
- Select the view from the View list, select the column
from the Columns list, and then click Values.
- Select the value from the Values list, and then click
OK. You can filter the values that are listed by clicking
Set, selecting Apply a filter, and specifying a value
for the Filter criterion. For more information about setting
a filter, see Set Filter Dialog
Box.
Note Adding a new view or column value does not insert additional keywords or punctuation, even when they are required to make the SQL statement valid. You can use Query Designer to design the report SQL statement in a graphical user interface. For more information about how to use Query Designer to modify queries, see How to Use Query Designer to Create or Modify Report Queries. - Click the location within the SQL statement to insert the new
view.
-
To add a prompt to the SQL statement, click Prompts. For more information about adding prompts to a SQL statement, see How to Create or Modify Report Prompts.
-
Click OK, and then click OK again.
See Also
Tasks
How to Create or Modify Report PromptsHow to Use Query Designer to Create or Modify Report Queries
Reference
Column Values Dialog BoxPrompt SQL Statement Dialog Box
Prompts Dialog Box
Report SQL Statement Dialog Box
Set Filter Dialog Box
Concepts
About Report PromptsSQL Query Statement Reference