Partager via


How to Create a Custom Report

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

This topic describes how to create a custom report in the Commerce Server Staging (CSS) console. You must have knowledge of SQL Server to write the WHERE clause of an SQL query that uses a combination of filter names and operators that makes sense to you.

You can use the following filters to create a WHERE clause expression:

Filter name

Description

EventTime

When the event occurred.

Data for EventTime is stored in UTC and displayed in local time formats. In your expression, use UTC time.

For example:

EventTime = EventTime > DateAdd('h', 7, #6/2/2006 12:18:30 PM #)

Or

EventTime between DateAdd('h', 7, #6/2/2006 12:18:30 PM #) and now()

Severity

Whether the event was an Error (E), Warning (W), or Informational (I).

For example:

Severity = 'E'

Machine

Name of the server where the error occurred.

For example:

Machine like '%machinename%'

Project

Name of the project.

For example:

Project = 'projname'

Destination

Waypoint or endpoint that was affected by the event.

For example:

Destination like 'D:\ku%'

Description

Text of the event message.

For example:

Description like 'Commerce Server%'

CSSCode

Code assigned to the event.

For example:

CSSCode = 61243

Note

Filter names are not case sensitive.

You can create a custom query to view specific information about an event. For example, if you want to see a report of the specific event 61112, which indicates that the Commerce Server Staging service started successfully, write the following expression:

CSSCode = 61112

You can also create a custom query by using two or more filters. For example, if you want to see a report of all events for a certain project and that match specific codes, write the following expression:

project = 'projname' and (csscode = 61237 or csscode = 61232)

If you want to see a report of all informational events or events that are on a certain server, write the following expression:

severity = 'I' or machine like '%machinename%'

If you want to see a report of all events on a certain server or that match a specific project and description, write the following expression:

machine like '%machinename%' or (project = 'projname' and description like 'Commerce Server%')

The custom query is issued against the local events database. You can configure the Local Event Log settings to determine which events you want to store in the database.

Note

The custom reports that you create cannot be saved with the standard reports from the Commerce Server Staging console.

To create a custom report

  1. Click Start, point to Programs, point to MicrosoftCommerce Server 2007 , and then click Commerce Server Staging.

  2. In the Commerce Server Staging console, in the left pane, expand Commerce Server Staging, expand <server name>, expand Event Reports, expand Local Events, and then click Custom Report.

  3. In the right pane, in the WHERE text box, type an SQL expression using the filters given in the SELECT list together with your query parameters, and then click Submit. Your query results will appear in the right pane, under the WHERE text box.

See Also

Other Resources

Event Codes for Staging

How to View Local Staging Events

How to Configure CSS Reports

Monitoring Commerce Server Staging