### Sending a large page report result by e-mail upon finishing

Here two ways are provided to publish a large report result via URL: JSP and servlet. Take the following examples to publish a large report result by e-mail and to customize the message displayed in the web browser.

- Using JSP

  See JSP parameters.

  Use tryView.jsp to run a report without a parameter:

  `http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.report=%2fSampleReports%2fEmployee Information.cls&jrs.timeout_send_email=true&jrs.report_timeout=5&jrs.mailto=person@company.com&jrs.mailsubject=TaskForTimeoutSendEmail&jrs.result_type=1&jrs.mailcomments=IFTHEREPORTISFINISHEDTHERESULTWILLBESENT&jrs.mailfrom=person@company.com`

  Use runReport.jsp to run a report with parameters:

  `http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=jrs.web_vw&jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.report=%2fSampleReports%2fCustomerAnalysis.cls&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007&jrs.timeout_send_email=true&jrs.report_timeout=1&jrs.mailto=person@company.com&jrs.mailsubject=AboutTaskForTimeout&jrs.result_type=1`

- Using Servlet

  See Servlet parameters.

  Use a servlet to run a report without a parameter:

  `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/Employee Information.cls?jrs.cmd=jrs.try_vw&jrs.timeout_send_email=true&jrs.report_timeout=1&jrs.mailto=person@company.com&jrs.mailsubject=AboutTaskForTimeoutSendEmail&jrs.result_type=1&jrs.mailcomments=COUNTRECORDSPERPAGE`

  Use a servlet to run a report with a parameter:

  `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/CustomerAnalysis.cls?jrs.cmd=jrs.web_vw&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007&jrs.timeout_send_email=true&jrs.report_timeout=1&jrs.mailto=person@company.com&jrs.mailsubject=TaskForTimeoutEmail&jrs.result_type=1&jrs.mailcomments=CUSTOMERORDER`

- Customize your message to be displayed in the web browser

  You can set a message by setting the parameter jrs.timeout_sendmail_message.

  For example, you want to display message as follows:

  Running <report name> takes more than <Timeout> seconds.
  The subject is <mail subject> and has been sent to <mailto> from <mailfrom>
  It is a file whose type is <type>.

  Then you can set the parameter in URL:

  jrs.timeout_sendmail_message=Running {6} takes more than {0} seconds.<p>The subject is {2} and has been sent to {1} from {5}.<p>It is a file whose type is {3}.

  Where

  {0} - The report timeout
  {1} - mail to
  {2} - mail subject
  {3} - result type
  {4} - mail comment
  {5} - mail from
  {6} - Catalog name/report
  <p> - an Enter key

  Example

  `http://localhost:8888/jrserver/SampleReports/SampleReports.cat/CustomerAnalysis.cls?jrs.cmd=jrs.web_vw&jrs.param$P_StartDate=01/01/2006&jrs.param$p_EndDate=12/31/2007&jrs.timeout_send_email=true&jrs.report_timeout=1&jrs.mailto=person@company.com&jrs.mailsubject=AboutTaskForTimeoutSendEmail&jrs.result_type=1&jrs.mailcomments=CustomerAnalysis&jrs.mailfrom=person@company.com&jrs.timeout_sendmail_message=...`

  This {6} is a large report whose runtime is over {0} seconds.<p>The report is sent to {1} from {5}.<p>The subject of the mail is {2}.<p>Its type is {3}.

  Note: You should type the single quote sign " ' " twice if you use it in the message.