SMS 2.0 includes an installation option called Crystal Reports which is an SMS 2.0 snap-in provided by Seagate Corporation. The version supplied with SMS 2.0 is Crystal Info 6.0. Crystal Info is a useful reporting tool that can generate a variety of reports based on information stored in the SMS database such as inventory, product compliance, and system status. Because Crystal Info is integrated as a Microsoft Management Console (MMC) snap-in, it is fully integrated into the SMS Administrator Console. In addition to running the default reports provided with Crystal Info, you can create your own reports or customize the defaults. The reports can be scheduled to run at a particular time or even on a recurring basis. Report types include the following:
When you choose Crystal Info as an option during setup, SMS installs several default reports. These reports can be found in the Reports folder under Tools in the SMS Administrator Console. The default reports are broken into five categories: Configuration, Hardware Inventory, Product Compliance, Queries, and Status. Each category includes one or more reports that you can run or customize. When you select one of these folders, the reports it contains will be listed in the right pane, preceded by one of three icons, shown in Figure 15-17.
Figure 15-17. Sample reports available in the Product Compliance folder.
The green check mark (an OK indicator) shows that the report is ready to view, meaning that it has run successfully. The yellow triangle with an exclamation point (a Warning indicator) shows that the report is currently unscheduled and so has not yet been run. A red "x" (a Critical indicator) shows that the report experienced a failure and did not run properly. Additional information about the status of each report can be obtained by right-clicking on the report and choosing Properties from the context menu to display the Report Properties window.
Running a Crystal Info report is relatively straightforward and involves telling SMS when the report should run and under what security context. The administrators who will run Crystal Info reports must have access to the WMI data classes used by the SMS Provider, which itself accesses the SMS database. Remember, at no time do you ever query the SMS database directly—you always go through the WMI via the SMS Provider.
To create reports, your user account could be a member of the SMS Admins group, which of course does have appropriate access. If you do not want to add your user account to this group, you must specify an account that does have appropriate access permission. Accessing resources through another user account is known as "impersonation." However, for impersonation to work under Windows NT, your user account must have the Act As Part Of The Operating System user right assigned at your Windows NT workstation.
To run a Crystal Info report through the SMS Administrator Console, follow these steps:
Figure 15-18. The Schedule Report Properties window.
Figure 15-19. The Schedule tab.
Figure 15-20. The Accounts tab.
Figure 15-21. The Selection Formula tab.
Figure 15-22. The Prompts tab.
The report will run at the scheduled time. To view the report, select the report entry under its report folder. The report is initially displayed in the right pane of the SMS Administrator Console. Viewing of this report (as shown in Figure 15-23) was facilitated by suppressing the view of the console tree. By resizing the screen, changing the zoom percentage, and using the scroll bars, you can view various parts of the report. You can also print the report if you want.
Figure 15-23. Sample report generated using Crystal Info.
TIP
To generate a Crystal Info report, you must have installed a printer driver on your workstation. The reports display much better—and print better too—if you install a high-resolution print driver such as a PostScript printer.
The three main tasks involved in creating a new Crystal Info report are as follows:
Unlike SMS queries, to create a Crystal Info report you need a more extensive knowledge of the WMI object classes that compose the SMS database. To create a new report, you should start the Info Report Designer, which enables you to control the layout, data, and style of the report. While the Info Report Designer is a point-and-click interface, you must still select items from lists of classes and attributes. (Appendix E of the Systems Management Server Administrator's Guide will prove useful for you in this regard, as will the Microsoft Systems Management Server Resource Guide, part of the Microsoft BackOffice 4.5 Resource Kit.)
To create a report, follow these steps:
Figure 15-24. The Info Report Designer welcome dialog box.
Figure 15-25. The Report Gallery dialog box.
Figure 15-26. The Create Report Expert window.
Figure 15-27. The Log On Server dialog box.
Figure 15-28. The Configure Connection dialog box.
Figure 15-29. The Choose SQL Table dialog box.
Figure 15-30. The Links tab.
Save the report template you just created by clicking Preview Report, File, and then choosing Save from the Info Report Design menu. By default, your report will be saved in the \SMS\CInfo\Winnt folder on the site server.
Figure 15-31. The Link Options dialog box.
Figure 15-32. The Fields tab.
Figure 15-33. The Style tab.
Your new report needs to be added to a folder under Reports in the SMS Administrator Console. You can create a report folder to organize your reports. To create a new folder, follow these steps:
Figure 15-34. The Seagate Crystal Info dialog box.
To add your report to the new folder or to an existing folder, follow these steps:
Figure 15-35. The New Report Object Properties window
NOTE
Remember to close the report in the Info Report Designer before you add it to a report folder; otherwise a sharing violation will occur.
To modify an existing report, follow these steps:
You must connect to the WBEM data source server before you make any changes to the report data. For details on how to connect to the WBEM data source server, refer to the section "Creating a Report" earlier in this chapter.
Figure 15-36. The Reporting tab of the File Options Properties window.
MORE INFO
Refer to the Systems Management Server Administrator's Guide and the online help for the Info Report Designer for more details on creating, modifying, and updating reports.
You can use any reporting tool you want to extract information from the SMS database. The most important requirement is that your tool be WBEM ODBC-compliant—in other words, the reporting tool must use the WBEM ODBC driver installed with the SMS Administrator Console to access the SMS database via the SMS Provider and WMI. Microsoft Access 97 and later is one such tool; another is Microsoft Excel 97 and later using the Query Extract tool included in the Microsoft BackOffice 4.5 Resource Kit. Let's look first at the Excel 97 Query Extract tool as an alternative way of creating and generating reports.
As mentioned, the Query Extract tool is provided as part of the Microsoft BackOffice 4.5 Resource Kit utilities. This tool consists of an Excel workbook and template that contain macros designed to use the WMI Scripting API to access the database via the SMS Provider. You provide the name of the site server and a valid access account, and Query Extract in turn finds the SMS database server. Here's the really neat part: Query Extract displays for you a list of all the current SMS queries to choose from so you don't have to worry about learning a query language. You select the query or queries that you want to execute. The results of each query are placed on a separate workbook page. You are then free to analyze this data as you see fit. You can create charts, pivot tables, or export the data to another database or application format such as Microsoft PowerPoint.
As mentioned, Excel contains both a workbook version and a template version of this tool. If you import the workbook version, it functions as a stand-alone file—meaning that when you import SMS data into this tool and save the file, you need to import another Query Extract worksheet for the next set of reports you want to create. However, if you use the template version to generate a new report, you can simply open a new workbook based on the template, without the need to import another Query Extract worksheet.
The Query Extract tool workbook and template files are named SMSExtract.xls and SMSExtract.xlt. When the Microsoft BackOffice 4.5 Resource Kit utilities are installed, these files can be found under the Resource Kit\SMS\Report directory. Copy the two files into the appropriate folder on your SMS Administrator Console computer—for example, C:\Program Files\Microsoft Office\Templates.
Let's walk through the basic steps for using the Query Extract tool with Excel 97:
Figure 15-37. The SMS Login dialog box.
NOTE
A version of this tool, named SMSQuery.xlt, is included with SMS 2.0 and can be found in the Support\Reskit\Bin\platform\Diagnose folder on the SMS 2.0 CD or in the same folder when you install the Supportability Tools with SMS 2.0 Service Pack 1. Aside from some formatting differences, this version works the same way as the Resource Kit tool; however, it does not support prompted queries.
Figure 15-38. The Select Site Query To Import dialog box.
Figure 15-39. A sample results workbook page.
Using Access to extract SMS database information requires that the WBEM ODBC driver first be installed on the Access workstation. If you installed the SMS Administrator Console on this computer, you have already installed this driver by default. If not, you can install it from the SMS 2.0 CD or from the SMS_SiteCode share (the \SMS folder) on the primary site server. On the CD, it can be found in \SMSSetup\Bin\platform\Wbemsdk.exe; on the site server, it can be found in \SMS\bin\platform\Wbemsdk.exe. When you launch this program, a simple wizard is displayed that will walk you through the installation. You will need to restart your computer when the installation is complete.
You can then use Access configuration options to point to the SMS database using the WBEM ODBC driver. You will need to have a valid account and password, as described earlier. Refer to your Access documentation for instructions regarding the configuration of Access to import data from SQL databases.
MORE INFO
Chapter 15 of the SMS 2.0 Resource Guide (part of the Microsoft BackOffice 4.5 Resource Kit, available through Microsoft Press) offers several approaches to extracting information from the SMS database using Microsoft Access, such as creating links to the SMS data and creating SQL pass-through queries. Refer to that chapter for a detailed discussion of these approaches.