Question

I am trying to schedule a Webi report using SDK, I can schedule Once, Monthly and other types.

Could anyone tell me how to schedule a Webi report weekly?

I can set the schedule type to WEEKLY and start and end date, but there is no API available for setting days of the week on which report will schedule.

Also, user doesn't have access to any Calendar.

Thanks.

Was it helpful?

Solution

It's unlike the other modes. You have to get the ICalendarRunDays object and add days into it.

Assuming you're using the Java SDK, and you have the object's ISchedulingInfo as iSched:

iSched.setType(CeScheduleType.CALENDAR);
iSched.getCalendarRunDays().add(ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, java.util.Calendar.MONDAY, ICalendarDay.ALL);
iSched.getCalendarRunDays().add(ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, ICalendarDay.ALL, java.util.Calendar.WEDNESDAY, ICalendarDay.ALL);

This is the "proper" way to do it. You could replace all the ICalendarDay.ALL references with -1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top