4c4bcf7cdc9aef2ef3b477719a07f9893f276a22
FAQ/Questions/How-do-I-use-the-Izenda-Reports-report-email-scheduler.md
| ... | ... | @@ -2,6 +2,9 @@ |
| 2 | 2 | |
| 3 | 3 | [[_TOC_]] |
| 4 | 4 | |
| 5 | + |
|
| 6 | +For [[advanced scheduler functionality|http://http://wiki.izenda.us/Guides/Advanced-Scheduler-Functionality]] |
|
| 7 | + |
|
| 5 | 8 | ##Izenda Reports Scheduler Setup Instructions |
| 6 | 9 | |
| 7 | 10 | ###Task-based scheduler |
| ... | ... | @@ -138,69 +141,4 @@ Using the rs.aspx Page |
| 138 | 141 | 1. In your application, navigate to the rs.aspx (ex., http://yourhost/yourapp/rs.aspx) |
| 139 | 142 | 2. Add the followingto the end of the URL: ?run_scheduled_reports=30 (30 equals the frequency in minutes it will run) |
| 140 | 143 | 3. The url in the browser should read: http://yourhost/yourapp/rs.aspx?run_scheduled_reports=30 |
| 141 | -4. This will return a list of reports and their next scheduled date and time in the browser window |
|
| 142 | - |
|
| 143 | -##Security On Scheduled Reports |
|
| 144 | - |
|
| 145 | -Scheduled reports only supports per-user security using the Link format. Scheduled attachments will not apply hidden filters normally, but you can apply security through [[PreExecuteReportSet()|/FAQ/PreExecuteReportSet]] based on the security of the report owner. If per-user security is required, the Link format will require the user to login before seeing the report. |
|
| 146 | - |
|
| 147 | -##Saving Reports to Disk |
|
| 148 | - |
|
| 149 | -The Scheduler can be used to save reports to disk. |
|
| 150 | - |
|
| 151 | -Here are some basic instructions for setting up this functionality with the Scheduler. |
|
| 152 | - |
|
| 153 | -* Add the file [[FileScheduler.cs|/FAQ/Questions/How-do-I-use-the-Izenda-Reports-report-email-scheduler/FileScheduler.cs]] to the folder \App_Code\ |
|
| 154 | -* In SchedulerPage.aspx, we will create the SchedulerPage.aspx.cs |
|
| 155 | - |
|
| 156 | -From your root, create a page called SchedulerPage.aspx with the following SchedulerPage.aspx.cs code behind: |
|
| 157 | - |
|
| 158 | -```csharp |
|
| 159 | -using System; |
|
| 160 | -using System.Collections.Generic; |
|
| 161 | -using System.Web; |
|
| 162 | -using System.Web.UI; |
|
| 163 | -using System.Web.UI.WebControls; |
|
| 164 | - |
|
| 165 | -public partial class SchedulerPage : System.Web.UI.Page |
|
| 166 | -{ |
|
| 167 | - protected void Page_Load(object sender, EventArgs e) |
|
| 168 | - { |
|
| 169 | - FileScheduler.RunScheduledReports(Response.Output, DateTime.Now); |
|
| 170 | - } |
|
| 171 | -} |
|
| 172 | -``` |
|
| 173 | - |
|
| 174 | -How to use: |
|
| 175 | -* Create a report and schedule it. In this case, we need to save to a folder -- so instead of an email recipient, specify the folder in which to save your report. |
|
| 176 | -* Open the SchedulerPage.aspx page in the browser. |
|
| 177 | - |
|
| 178 | -##Clearing scheduler settings on new report save |
|
| 179 | - |
|
| 180 | -You can use the following custom code to make sure that when a copy of a report is saved, the scheduler settings are not saved along with the report copy: |
|
| 181 | - |
|
| 182 | -```csharp |
|
| 183 | - |
|
| 184 | -public override void SaveReportSet(ReportInfo reportInfo, ReportSet reportSet) |
|
| 185 | -{ |
|
| 186 | - ReportSet existingReport = LoadFilteredReportSet(reportInfo.FullName); |
|
| 187 | - // If this is a new report or SaveAs report |
|
| 188 | - if (existingReport == null) |
|
| 189 | - { |
|
| 190 | - reportSet.Recipients = ""; |
|
| 191 | - reportSet.RepeatType = RepeatType.None; |
|
| 192 | - } |
|
| 193 | - |
|
| 194 | - // Save report normally |
|
| 195 | - base.SaveReportSet(reportInfo, reportSet); |
|
| 196 | -} |
|
| 197 | - |
|
| 198 | -``` |
|
| 199 | - |
|
| 200 | -##Overnight batch report processing |
|
| 201 | - |
|
| 202 | -One extremely useful function of scheduling reports is batch processing of reports during nighttime hours. Implementation of overnight processing is just a matter of setting which reports will run during office off-hours. |
|
| 203 | - |
|
| 204 | -First, you need to open the report you will want to schedule in the ReportDesigner. Navigate to the [[Misc tab|http://wiki.izenda.us/Guides/ReportDesign/9.0-Misc-Tab]] and choose the time your report will run and the frequency. For overnight processing, just select a time period that does not conflict with your normal business hours. Save the report with the desired frequency. You must do this for each report you want to process. |
|
| 205 | - |
|
| 206 | -Next, you will just need to ensure the scheduler process is running. Normally servers are left on overnight anyway, so just as long as the server computer that the scheduler is installed on and the server where the reporting application is installed on are running, the reports will get processed. Generally, these will be on the same machine anyway. The interval of the scheduler you defined when you installed it will ping the reporting application to see if any reports need to be scheduled. If one or more are scheduled, the reporting application will begin processing and sending those reports via email. So essentially, overnight processing is the same process as any other time of day with respect to setup. |
|
| ... | ... | \ No newline at end of file |
| 0 | +4. This will return a list of reports and their next scheduled date and time in the browser window |
|
| ... | ... | \ No newline at end of file |