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

[Solved] iCal import issue

3 Answers 172 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Alfred Ortega
Top achievements
Rank 2
Alfred Ortega asked on 18 Mar 2008, 03:19 PM
Control: Scheduler
Version: 2- 25-08
Outlook Version:  2003

I'm getting the following error:

"Microsoft Office Outlook cannot import vCalendar file. This error can appear if you have attempted to save a recurring Lunar appointment in iCalendar format. To avoid this error, set the appointment option to Gregorian instead of Lunar."

After some trial and error I can reproduce it easily.  Here is an example of an iCal event that will work no problem:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Telerik Inc.//NONSGML RadScheduler//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20080321T063000Z
DTEND:20080321T113000Z
UID:20080318T145738Z-2
DTSTAMP:20080318T145738Z
SUMMARY:ODSE Class 25 attendees
END:VEVENT
END:VCALENDAR



Here is one that will NOT work (and which the control made):

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Telerik Inc.//NONSGML RadScheduler//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20080321T063000Z
DTEND:20080321T113000Z
UID:20080318T145738Z-2
DTSTAMP:20080318T145738Z
SUMMARY:ODSE Class
25 attendees

END:VEVENT
END:VCALENDAR


Notice the extra line on the summary - that's what causes the problem.  Any ideas on what can be done? 

Thanks in advance,
Al

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 18 Mar 2008, 05:25 PM
Hello Alfred Ortega,

The export code does not insert additional newline characters. My guess is that the appointment subject already contains new lines. Try replacing them with "\n" - the standard character for new line in iCalendar:

BEGIN:VCALENDAR 
VERSION:2.0 
PRODID:-//Telerik Inc.//NONSGML RadScheduler//EN 
METHOD:PUBLISH 
BEGIN:VEVENT 
DTSTART:20080321T063000Z 
DTEND:20080321T113000Z 
UID:20080318T145738Z-2 
DTSTAMP:20080318T145738Z 
SUMMARY:ODSE Class\n25 attendees 
END:VEVENT 
END:VCALENDAR 

A simple replace should be enough:

string result = subject.Replace("\r\n""\\n"); 
result = subject.Replace("\n""\\n"); 

Let us know if this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Alfred Ortega
Top achievements
Rank 2
answered on 18 Mar 2008, 05:31 PM
Tsvetomir,
Thanks for the reply and yes I'll do the replace. 

Here is a request for enhancement then.  Since entering in text into the summary area is done in a multi-line text box - shouldn't the newline character be expected?  I request that the export method itself should account for it and the export should simply work smoothly as the grid exports do.

Thanks for your consideration,
Al

0
Accepted
T. Tsonev
Telerik team
answered on 19 Mar 2008, 06:36 AM
Hi Alfred,

You are correct - the replacement should be part of the integrated export routine. We will include the fix for the next release. Thank you for bringing the issue to our attention. Your Telerik points have been updated for your involvement.

Greetings,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Alfred Ortega
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Alfred Ortega
Top achievements
Rank 2
Share this question
or