2011-07-06 48 views
0

是否可以通過XtraScheduler控件製作「總時間」報告? 我需要幾個報告來計算每個resorce和約會類型的按日/周/月的總時間。帶XtraScheduler控件的總時間報告

可以用XtraSchedulerReport來做到這一點,或者我必須計算這個manualy?

回答

4

沒有任何內置函數可以根據資源和約會類型計算總時間,但使用XtraScheduler可以完成此操作。看看以下兩個例子更好的細節如何:

http://www.devexpress.com/Support/Center/e/E977.aspx

http://www.devexpress.com/Support/Center/e/E121.aspx

:)

另外,嘗試這樣的事:

internal static TimeIntervalCollectionEx CalculateBusyTime(AppointmentBaseCollection appointments, TimeInterval interval) { 

     TimeIntervalCollectionEx busyIntervals = new TimeIntervalCollectionEx(); 

     int count = appointments.Count; 

     for (int i = 0; i < count; i++) 

      busyIntervals.Add(TimeInterval.Intersect(interval, appointments[i].CreateInterval())); 

     return busyIntervals; 

    }