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

Count of the recurring events and non recurrent

3 Answers 29 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alla
Top achievements
Rank 1
Alla asked on 22 Jun 2016, 09:02 PM

Wondering if someone wrote a code to read the recurring events details field and count it?

Let's say I have 5 events entered in 1 week, but 2 of those entered as recurring - the totals for the week would show as 4 events instead of 5, because the query count number of events as number of the rows in the table, using the date range specified. Since 2 of those are recurring - there is 1 row in the SQL table for both events and it would count it as 1 event instead of 2 events taking place in that week. Hope it makes sense. Please advise on how to calculate the events properly, when recurring events exist... The events are also can be of different type and I would need to count it in separate totals. I would like a way to setup the count in a query in SQL and pass date range as parameters, not on load of the scheduler, since I need to use the count in the gridview with the scheduler on the screen, as well as show the count on the reports. Thank you!

3 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 27 Jun 2016, 01:34 PM
Hello Alla,

I would suggest you to refer to the following post, where you can observe an approach for achieving the desired implementation:

http://www.telerik.com/blogs/working-with-radscheduler-recurring-appointments-on-sql-server

Regards,
Nencho
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Alla
Top achievements
Rank 1
answered on 29 Jul 2016, 02:28 PM

Thank you. If I understand correctly, I can add grouping to the function in the example and count appointments, adding the type of the appointment (per my requirement)? As well as declare this function as stored procedure in SQL, correct?

Thanks, Alla

0
Veselin Tsvetanov
Telerik team
answered on 03 Aug 2016, 08:57 AM
Hello Alla,

Yes, you could add any other filtering rules (including filtering by type of event) to the specified query and also save it as a stored procedure in SQL.

Regards,
Veselin Tsvetanov
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Scheduler
Asked by
Alla
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Alla
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or