This is a migrated thread and some comments may be shown as answers.

Reporting on Recurring Appointments

1 Answer 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 01 Nov 2011, 06:11 AM
Hi, 

I'm sure this is a common request. Do you have an example of how to report on recurring appointments using the recurrence pattern saved with the appointment?

We have many recurring appointments, and our reports need to include these when getting appointments by a range of dates.
We are using Entity Framework so ideally your example uses a partial class approach.

Thanks

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Nov 2011, 09:27 AM
Hi Simon,

We do not have such an example at the moment, but I would suggest you to use GetOccurrences method to get the occurrences of appointments within a time frame.

If you loop through the AppointmentsSource of the ScheduleView and call this method for each appointment, you'll get the needed result:

var allAppointments = new ObservableCollection<Occurrence>();
foreach(var a in appointments)
{
    allAppointments.AddRange(a.GetOccurrences(DateTime.Today, DateTime.Today.AddDays(30)));
}


Best wishes,
Yana
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Simon
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or