English 中文(简体)
需要编写报告,说明使用时间
原标题:need to create report showing usage over time

我试图编写一份报告(图表真实),以显示在特定时期内应用的情况。

我有一个数据库,包含以下信息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)
问题回答

1. 制定计算期限的公式:

  //{@duration}
  If Isnull({APPLICATION_USAGE.end_time}) Then
    DateDiff("s", {APPLICATION_USAGE.start_time}, (DataDate + DataTime))
  Else
    DateDiff("s", {APPLICATION_USAGE.start_time}, {APPLICATION_USAGE.end_time})

在报告标题部分插入一个交叉表格。 将“名称”栏添加到“Ros”栏,然后对“反射”栏目作一改动。 之后,将{@duration}领域添入了摘要化外地盒。 确保计算为摘要。

在报告标题部分增加一个图表。 选择跨塔邦。 选用标识——从名单变动中取名,从名单上剔除;从显示名单中删除{@duration}。 Click OK, 然后对报告进行总结。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签