Prev | Current Page 651 | Next

Frank Zammetti

"Practical DWR 2 Projects"


Figure 7-12. Scheduling a report
Since we??™ve seen adding a report, we should also see removing one:
this.removeReportFromSchedule = function(inReportName, inDaysOfWeek,
inRunTime) {
if (confirm("Are you sure you want to remove report '" +
inReportName + "' from the schedule?")) {
ReportSchedulingWorker.removeReportFromSchedule(inReportName,
CHAPTER 7 n ENTER THE ENTERPRISE: A DWR-BASED REPORT PORTAL 376
inDaysOfWeek, inRunTime,
{ callback : RePortal.updateScheduledReportListCallback }
);
}
}
This is very much along the lines of the method to remove a favorite that we examined
earlier, so there??™s probably no need to rehash that here.
The final scheduling-related method is viewScheduledRun(), which is called when the user
clicks the last column of the row for a report that has been run.
this.viewScheduledRun = function(inReportName, inDaysOfWeek,
inRunTime) {
lightboxPopup("divPleaseWait", true);
ReportSchedulingWorker.viewScheduledRun(inReportName, inDaysOfWeek,
inRunTime,
{
callback : function(inResp) {
lightboxPopup("divPleaseWait", false);
var reportWindow = window.open(null, inReportName,
"width=780,height=550,scrollbars,resizable,toolbar");
reportWindow.


Pages:
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663