Page History
...
| Table of Contents |
|---|
|
Setting up a Database Connection
Configuring a Report using Microsoft Reporting Services Publishing a Report to IIS
...
|
...
Although Uptime Infrastructure Monitor has powerful reporting features, you may want to generate reports in a custom format with a specific set of user-defined data. Microsoft Reporting Services allows you to take data from an MS SQL Server DataStore and use that data to create a report that addresses your specific needs.
...
Before you begin
...
This article assumes that you have installed Microsoft Reporting Services and its prerequisites:
- Internet Information Server (IIS) with ASP.NET
...
- SQL Server
...
- Visual Studio .NET
Please also refer to to Running Uptime Infrastructure Monitor with an MS SQL Server DatabaseOracle database.
...
Setting up a
...
database connection
To set up a database connection:
- Start Microsoft Visual Studio .NET, and then choose File>New>Project File > New > Project. The following New Project window appears:.
- In the Project Types tree, select Select the Business Intelligence Projects folder in the left portion of the window.Select .
- In the Templates area, select the Report Project template in the right portion of the window.
- Enter In the Name field, type a name for your report in the Name field , and then click OK.
- Click the View / Solutions Explorer button to open the Solution Explorer window.
- Right-click Shared Data Sources, and then select Add New Data Source.
- In the Data Link Properties window, click the Provider tab.
- Double-click Microsoft OLE DB Provider for SQL Server, which opens the Data Link Properties window on the Connection tab.
...
- Enter Type the name of the database server, and then use the user name / and password combination needed to login log in to the server.
- Click the Test Connection button to to verify that you can establish a connection to the database.
- Choose the database from which you want to retrieve the data will be retrieved , and then click OK.
...
...
Configuring a
...
report using Microsoft Reporting Services
To configure a report in Microsoft Reporting Services:
- In Microsoft Visual Studio .NET, right-click Reports, and choose select Add New Report. The Report Wizard starts.
- # Click Next.
- Select Shared data source, and then select the database from which you are retrieving data.
...
- Click Next.
- Enter the following query string:
Code Block language sql SELECT e.display_name AS 'Description',
...
AVG(p.cpu_usr + p.cpu_sys + p.cpu_wio) AS 'CPU Workload Average',(CONVERT(char(10),s.sample_time,102)) AS 'Date'
...
FROM performance_sample s, performance_aggregate p, entity e WHERE s.id = p.sample_id
...
AND e.entity_id = s.uptimehost_id AND s.sample_time > '
...
2023.11.29'
...
AND s.sample_time < DATEADD(day,5,'
...
2023.11.29')
...
This exampleGROUP BY (convert(char(10),s.sample_time,102)), e.display_name ORDER BY (convert(char(10),s.sample_time,102)), e.display_name;
...
- reports on the CPU workload average for all systems over the five day period from
...
- 2023-11-29 to
...
- 2023-12-03 (simply change the dates or the interval as required).
- Click Next after you change the range to suit your needs.
- Choose the Matrix option, and then click Next.
...
-
The Design the Matrix window appears, which enables you to change the way in which data is arranged in the report.
...
- In this example:
...
- Description is moved to the Rows field.
...
- Date is moved to the Columns field.
...
- CPU Workload Average is moved to the Details field.
- Click Next.
- In the Choose Matrix Style window, select Compact. The Design the Matrix window appears.
...
- Select to display all of the fields in the report, and then click Next.
- Click the Preview Report check box at the bottom of the page.
...
- Click Finish to generate a preview of the report.
...
...
Publishing a
...
report to IIS
When you are satisfied with your report, you can publish it to IIS (Internet Information Server, a Web server that runs under Windows) by completing the following steps:
- In Microsoft Visual Studio .NET, access the Solutions Explorer to open Solution Explorer.
- Right-click the current project, and then select Properties.
- In the Properties window, change the value of TargetServerURL to the URL where Reporting Services has been is installed. For example,
http://localhost/ReportServer.
...
- Click OK.
- In the Solutions Explorer, click Debug / Start to publish the report.
- After the report
...
- is published, your default Web browser
...
- automatically
...
- opens in the directory in which the report was published. Click
...
- the file name of the report to open it.
...
- You can also export the report from your web browser by selecting a format from the dropdown list, as shown below:
NoteInfo Published reports may not render properly in web browsers other than Internet Explorer. If, for example, you have set your default browser to Firefox and the report does not open properly after you have published it, copy and paste the URL of the report into Internet Explorer. You can also view the report by navigating to the Report Manager URL in Internet Explorer. By default, the URL is
http://localhost/Reports









