我试图编写一份报告(图表真实),以显示在特定时期内应用的情况。
我有一个数据库,包含以下信息I ll的使用:
- Application Name
- Application Version
- Start Time
- End Time (if still running, will == null)
I have other variables that I ll use to manipulate the data here and there, but my primary concern is the start / end time: What I m looking for is basically a line graph for a given period of time (using DateTimePicker, but that s simple to do), which will show how many clients are running an application over time.
因此,基本上只注重有效开端/终点时间,我如何在图表中显示这一点? 我在任何地方都进行了搜索,我以前曾做过报告,但可以说明如何将报告变成一线图表。
EDIT: Sample SQL Query:
SELECT REPORTING_CLIENT_INFORMATION.host_name,
APPLICATION_USAGE.start_time,
APPLICATION_USAGE.app_name,
APPLICATION_USAGE.app_version,
APPLICATION_USAGE.end_time,
APPLICATION_USAGE.shutdown_state
FROM APPLICATION_USAGE
INNER JOIN REPORTING_CLIENT_INFORMATION
ON APPLICATION_USAGE.host_id = REPORTING_CLIENT_INFORMATION.host_id
WHERE (APPLICATION_USAGE.start_time <= CONVERT(DATETIME, @end, 102)) AND
(REPORTING_CLIENT_INFORMATION.host_name LIKE N %DNCS% ) AND
(APPLICATION_USAGE.end_time >= CONVERT(DATETIME, @start, 102) OR
APPLICATION_USAGE.end_time IS NULL)