Answer
In order to create a pie graph, you must use the pie graph control included with Altiris Console 6.5. This control is used to display a set of data in the form of a pie graph, which means the data represented must include a total sum of parts and the appropriate fractional components. This allows the pie graph control to interpret the data as percentages that can be drawn as "slices" of the pie.
The Web part must be configured to use this control to display the pie graph. The first step in setting this up is to configure the Web part to use the pie graph control. In the Web Part Configuration page, make sure the Show URL radio button is selected in the Web Parts Contents of the page. The URL to the pie graph control must be typed into the box to the right, and it will look like the following:
/Altiris/Console/WebParts/GraphOutput.aspx?ItemGuid={REPORT_GUID.EN_US}
The report_GUID in the previous example must be the GUID of an existing report in the Altiris database. There are a few ways to get the GUID of the report. Here are two easy ways to accomplish this:
This report must also have a specific format in order for the pie graph control to process the information correctly. The columns included in the report must be as follows:
There are a couple of items to note regarding this report format:
A valid report will have results similar to the following table:
Name | Value | _Color | _ReportTitleURL | _Order |
Total Checks | 562 | 000000 | /Altiris/NS/Admin/Reports/report_summary.aspx?Guid=<guid> | 1 |
Number OK | 244 | 20c638 | /Altiris/NS/Admin/Reports/report_summary.aspx?Guid=<guid> | 2 |
Number Not OK | 254 | d5e15c | /Altiris/NS/Admin/Reports/report_summary.aspx?Guid=<guid> | 3 |
Info | 0 | 32ced3 | /Altiris/NS/Admin/Reports/report_summary.aspx?Guid=<guid> | 4 |
Error | 64 | d53c45 | /Altiris/NS/Admin/Reports/report_summary.aspx?Guid=<guid> | 5 |
The _ReportTitleURL field in this example points to another report represented by the value <guid>. Replace the entire value <guid> (including angled brackets) with the GUID of the report you want to open when the user clicks on the link that appears beneath the pie graph. The name of this link will be the name of the report identified by the value <guid>.
The SQL needed to generate this report will generally require the use of the UNION operator. The previous table was created with the SQL command below. This is meant to provide an example for you to use to create your own reports that can be consumed by the pie graph control. An XML version of the report is also included in this article. This report can be imported into an Notification Server as a sample; however, this particular example will only return valid results if the Audit Integration Component for SecurityExpressions is installed on the Notification Server.
SELECT 'Total Checks' AS [Name],
SUM(OK) + SUM([Not OK]) + SUM(Info) + SUM(Error) As [Value],
'000000' AS [_Color],
'/Altiris/NS/Admin/Reports/report_summary.aspx?Guid=a6f4f35f-6b42-47c7-b154-6afac8b5eab4' AS [_ReportTitleURL],
'1' AS [_Order]
FROM Inv_Audit_Results_Summary
UNION
SELECT 'Number OK' AS [Name],
SUM(OK) As [Value],
'20c638' AS [_Color],
'/Altiris/NS/Admin/Reports/report_summary.aspx?Guid=a6f4f35f-6b42-47c7-b154-6afac8b5eab4' AS [_ReportTitleURL],
'2' AS [_Order]
FROM Inv_Audit_Results_Summary
UNION
SELECT 'Number Not OK' AS [Name],
SUM([Not OK]) As [Value],
'd5e15c' AS [_Color],
'/Altiris/NS/Admin/Reports/report_summary.aspx?Guid=a6f4f35f-6b42-47c7-b154-6afac8b5eab4' AS [_ReportTitleURL],
'3' AS [_Order]
FROM Inv_Audit_Results_Summary
UNION
SELECT 'Info' AS [Name],
SUM(Info) As [Value],
'32ced3' AS [_Color],
'/Altiris/NS/Admin/Reports/report_summary.aspx?Guid=a6f4f35f-6b42-47c7-b154-6afac8b5eab4' AS [_ReportTitleURL],
'4' AS [_Order]
FROM Inv_Audit_Results_Summary
UNION
SELECT 'Error' AS [Name],
SUM(Error) As [Value],
'd53c45' AS [_Color],
'/Altiris/NS/Admin/Reports/report_summary.aspx?Guid=a6f4f35f-6b42-47c7-b154-6afac8b5eab4' AS [_ReportTitleURL],
'5' AS [_Order]
FROM Inv_Audit_Results_Summary
ORDER BY [_Order]