Index

Accessing a Report Using URL

Introduction

Users sometimes want to reach a specific page by typing a full URL in a Web browser instead of clicking hyperlinks from the Server home page.  We provide the commands used in URL. These URLs can also be used in your applications. The Scheduling Command and its Properties section further explain the scheduling task.

Note: Users of the PDF-version manual, some command line examples are too long to be displayed in the pdf file, so please refer to the html version.

Notes for upgrading to version 6:

Accessing a report using URL

Protocols/Commands

With the commands below, you can directly type the whole URL in a browser to access the destination.  The HTTP methods GET and POST are available for almost all of the commands.

Directly Login

  1. jrs.authorization
    Tag of the HTTP query field: jrs.authorization
    Description: load the JRServlet and avoid the login dialog in web browsers.

    Format of the value of the HTTP query field: Base64-encoded(userID:password)

    URL Example: userID="admin", password="admin"
    then Base64-encoded("admin:admin")="YWRtaW46YWRtaW4="
    then URL-encoded("YWRtaW46YWRtaW4=")="YWRtaW46YWRtaW4%3D"

    The URL: http://localhost:8888/jrserver?jrs.cmd=jrs.get_subnodes&jrs.authorization=YWRtaW46YWRtaW4%3D

    Note: JRServlet does not check security when a HTTP request has no jrs.cmd in the HTTP query in the root path of the JRServlet, so JRServlet does not accept the jrs.authorization for the request http://localhost:8888/jrserver?jrs.authorization=YWRtaW46YWRtaW4%3D
  2. jrs.auth_uid and jrs.auth_pwd
    Tags of HTTP query field: jrs.auth_uid and jrs.auth_pwd
    Description: load the JRServlet and avoid the login dialog in web browsers.

    Format of the value of the HTTP query field: jrs.auth_uid=USER_ID, jrs.auth_pwd=PASSWORD

    URL Example: userID="admin", password="admin"

    The URL: http://localhost:8888/jrserver/hsqlDemo?jrs.cmd=jrs.get_subnodes&jrs.auth_uid=admin&jrs.auth_pwd=admin

    Note: JRServlet does not check security when a HTTP request has no jrs.cmd in the HTTP query in the root path of the JRServlet, so JRServlet do not accept the jrs.auth_uid and jrs.auth_pwd for the request http://localhost:8888/jrserver?jrs.auth_uid=admin&jrs.auth_pwd=admin

How to Use the POST Method

  1. In HTML pages:
    Specify the POST as the method of a form in an HTML page.
  2. Using JRClient API or JRViewer Bean:
    Three methods: usePostAsDefaultMethod(), useGetAsDefaultMethod() and ifUsePostAsDefaultMethod() can be used in the class jet.client.api.JRClient.
  3. In java program:

    For example:

    URL url = new URL("http://jrserver:8888");
    URLConnection uc = url.getConnection();
    if (uc instanceof HttpURLConnection) {
    HttpURLConnection huc = (HttpURLConnection)uc;
          
    //set use POST method.
    huc.setRequestMethod("POST");
    huc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    huc.setDoOutput(true);
          
    //write the HTTP query to the output stream.
    OutputStreamWriter writer = new OutputStreamWriter(huc.getOutputStream());
    writer.write("jrs.cmd=jrs.get_subnodes");
    writer.close();
    huc.getHeaderField(0);
          
    //get the response content from the Server.
    InputStream inStream = uc.getInputStream();
    if (inStream != null) {
    BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
    String inputLine;
    while (null != (inputLine = reader.readLine())) {
    System.out.println(inputLine);
    } 
    }
    }

Examples: Switching Database Command

With these commands, you can switch the connection in the same database or between different databases at runtime.  If the databases have the same structure, you will be free from the work of building another similar catalog.  Instead, use switch database commands to set the JDBC connection or change the username/password to connect with another database.

Note: The two databases that you want to switch should share the same table structure.  Otherwise, you will see no data after switching to the new database.  

Case 1: Switching the Connection and User/Password in the Same Database
  1. Set the Oracle database named oracle815 connection  when designing the report Report1.cls, and later switch the connection to the Oracle database named demo at run time.

    The URL for switching the connection: http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/Report.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_url=jdbc:oracle:t hin:@host:1521:demo
  2. Specify the user ID system/manager to ensure the security when designing the report Report1.cls, and want to switch to the user ID Scott and the password tiger.

    The URL for switching the user ID and password:
    http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.db_user=Scott&jrs.db_pswd=tiger
  3. Set the Sybase 12 database named master when designing the report Report1.cls, and later switch the connection to the Sybase 12 database named product at runtime.

    The URL for switching the connection:
    http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1
    &jrs.jdbc_url=jdbc:sybase:Tds:host:5000/product
  4. Set the SQL database named MBA2000 when designing the report Report1.cls, and later switch the connection to the SQL database named JTTest at runtime.

    The URL for switching the connection:
    http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1
    &jrs.jdbc_url=jdbc:inetdae:host:1433?database=JTTest&sql7=true
Case 2: Switching the Connection between Different Databases
  1. Set oracle815 connection  when designing the report Report1.cls, and want to switch the connection to Access database with the JdbcOdbcDriver named products at runtime.

    The URL for switching the connection:
    http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1&jrs.jdbc_driver=sun.jd
    bc.odbc.JdbcOdbcDriver&jrs.jdbc_url=jdbc:odbc:products
  2. Set oracle815 connection  when designing the report Report1.cls, and want to switch the connection to SQL server database named products at runtime.

    The URL for switching the connection:
    http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/Report1.cls?jrs.cmd=jrs.try_vw&jrs.result_type=1
    &jrs.jdbc_driver=com.inet.tds.TdsDriver&jrs.jdbc_url=jdbc:inetdae:JT_P05:1433?database=products&sql7=true

Scheduling command and its properties

Use the below commands to schedule reports via URL in a Web browser.

jrs.submit_schedule
Constant: jet.cs.util.APIConst.CMD_SUBMIT_SCHEDULE
Description: submit a scheduled task to JReport Enterprise Server
HTTP Method: GET/POST
URL Example:
http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=%2fhsqlDemo%2fTutorial.cat
&jrs.task_class=jet.server.schedule.jrtasks.UpdateRptTask&jrs.launch_type=0
&jrs.param$PToday=May%2021%2c%201998&jrs.uid=admin&jrs.param_file=true&jrs.param$TermsDays=30&
jrs.expire_days=30&jrs.report=Invoice.cls

Response: Returns the task ID for JRClient API. Returns the scheduled tasks page for web browsers.

A schedule contains two kinds of properties. The first is about the time information. The second is about the task information.

Properties about launching type

Time:

Properties

Values Properties Values Properties Values Properties
jrs.launch_type (0, 1, 8) 0-immediately          
  1-run at time jrs.exe_year(1980-2099)        
  jrs.exe_month(1-12)        
jrs.exe_day(1-31)        
jrs.exe_hour(0-23)        
jrs.exe_min(0-59)        
8-run periodically jrs.days_id
(0, 1, 2)
0 - daily jrs.is_weekday(true,false) true  
        false jrs.day(1-999days)
1-weekly jrs.week(1-99 weeks)    
  jrs.weekdays({0, 1...5, 6} means {Sunday, Monday...Friday, Saturday)    
2-monthly jrs.is_day{true, false} true jrs.day(1th-31th)
      jrs.month(1-6 months)
false jrs.week(0 - first, 1 - second, 2 - third, 3 - fourth, 4 - last week)
  jrs.weekday({1, 2...6, 7} means {Sunday, Monday...Friday, Saturday}.
jrs.month(1-6 months)
*jrs.is_hourly(true,false)  false jrs.hour(1-12)    
    jrs.min(0-59)    
jrs.is_pm(true,false)    
true jrs.hours(1-99)    
  jrs.at_min(0-59)    
jrs.is_between{true, false} false  
  true jrs.hour(1-12hour)
  jrs.min(0-59)
jrs.is_pm(true,false)
jrs.hour2(1-12)
jrs.min2(0-59)
jrs.is_pm2(true,false)
*jrs.timezone timezone ID strings of java          
Note:

*jrs.is_hourly(true,false) is applied to the periodic tasks (jrs.launch_type= 8). Not matter you choose to run a report daily, weekly or monthly, you should set this property and its sub-properties.

*jrs.timezone is applied to all the schedule tasks. Not matter you choose to run the report instantly, at a specific time or periodically.

Following are details for each property in the above table:

jrs.launch_type
Constant: jet.cs.util.APIConst.TAG_LAUNCH_TYPE
Description: indicates running reports immediately, at a specific time or periodically.
Possible values: {0, 1, 8}; 0 - run immediately, 1 - run at time, 8 - run periodically

jrs.timezone
Constant: jet.cs.util.APIConst.TAG_TIMEZONE
Description: indicates the timezone of the time.
Possible values: timezone ID strings of java default is current locale.

Properties about running at a specific time

jrs.exe_year
Constant: jet.cs.util.APIConst.TAG_EXE_YEAR
Description: indicates to run in which year.
Possible values: 1980-2099

jrs.exe_month
Constant: jet.cs.util.APIConst.TAG_EXE_MONTH
Description: indicates to run in which month.
Possible values: 1-12

jrs.exe_day
Constant: jet.cs.util.APIConst.TAG_EXE_DAY
Description: indicates to run on which day.
Possible values: 1-31

jrs.exe_hour
Constant: jet.cs.util.APIConst.TAG_EXE_HOUR
Description: indicates to run which hour in a day (when jrs.is_hourly is false).
Possible values: 0-23hour

jrs.exe_min
Constant: jet.cs.util.APIConst.TAG_EXE_MIN
Description: indicates to run which minute in a hour (when jrs.is_hourly is false).
Possible values: 0-59minute

Properties about running periodically

jrs.days_id
Constant: jet.cs.util.APIConst.SCH_DAYS_ID
Description: indicates if the schedule will run daily, weekly or monthly.
Possible values: 0 - daily; 1 - weekly; 2 - monthly

Properties about daily

jrs.is_weekday
Constant: jet.cs.util.APIConst.SCH_IS_WEEKDAY
Description: indicates whether to run a report on a specific weekday (i.e. Monday - Friday).
Possible values: {true, false} default is false.

jrs.day
Constant: jet.cs.util.APIConst.SCH_DAY
Description: indicates every how many days to run (when daily is selected and jrs.is_weekday is false).
Possible values: 1-999

Properties about weekly

jrs.week
Constant: jet.cs.util.APIConst.SCH_WEEK
Description: indicates every how many weeks to run (when weekly is selected).
Possible values: 1-99 weeks

jrs.weekdays
Constant: jet.cs.util.APIConst.SCH_WEEKDAYS
Description: indicates on which day to run in a week (when weekly is selected).
Possible values: a digit string. {0, 1...5, 6} means {Sunday, Monday...Friday, Saturday}.

Example: jrs.weekdays=05 means running on Sunday and Friday.

Properties about monthly

jrs.is_day
Constant: jet.cs.util.APIConst.SCH_IS_DAY
Description: indicates if to run on xth day in a month (when monthly is selected).
Possible values: {true, false} default is true.

jrs.day
Constant: jet.cs.util.APIConst.SCH_DAY
Description: indicates to run on xth day in a month (when monthly is selected and jrs.is_day is true).
Possible values: 1th-31th default is 1.

jrs.week
Constant: jet.cs.util.APIConst.SCH_WEEK
Description: indicates to run on xth week in a month (when monthly is selected and jrs.is_day is false).
Possible values: 0 - first, 1 - second, 2 - third, 3 - fourth, 4 - last week default is 0.

jrs.weekday
Constant: jet.cs.util.APIConst.SCH_WEEKDAY
Description: indicates to run on which day in a week (when monthly is selected and jrs.is_day is false).
Possible values: {1, 2...6, 7} means {Sunday, Monday...Friday, Saturday} default is 7.

jrs.month
Constant: jet.cs.util.APIConst.SCH_MONTH
Description: indicates every how many months to run.
Possible values: 1-6 months default is 1.

Properties about hourly

jrs.is_hourly
Constant: jet.cs.util.APIConst.SCH_IS_HOURLY
Description: indicates whether to run the schedule every hour.
Possible values: {true, false} default is true.

jrs.hour
Constant: jet.cs.util.APIConst.SCH_HOUR
Description: indicates to run at which hour in a day (when jrs.is_hourly is false).
Possible values: 1-12hour default is 1.

jrs.min
Constant: jet.cs.util.APIConst.SCH_MIN
Description: indicates to run at which minute in a hour (when jrs.is_hourly is false).
Possible values: 0-59minute default is 0.

jrs.is_pm
Constant: jet.cs.util.APIConst.SCH_IS_PM
Description: indicates whether to run PM or AM in a day (when jrs.is_hourly is false).
Possible values: {true, false} default is true.

jrs.hours
Constant: jet.cs.util.APIConst.SCH_HOURS
Description: indicates every how many hours to run (when jrs.is_hourly is true).
Possible values: 1-99 hours default is 1.

jrs.at_min
Constant: jet.cs.util.APIConst.SCH_AT_MIN
Description: indicates to run at which minute in an hour (when jrs.is_hourly is true).
Possible values: 0-59minute default is 0.

jrs.is_between
Constant: jet.cs.util.APIConst.SCH_IS_BETWEEN
Description: indicates whether to run between the start time and the finish time (when jrs.is_hourly is true).
Possible values: {true, false}

Properties about minutely

jrs.is_minutely
Constant: jet.cs.util.APIConst.SCH_IS_MINUTELY
Description: indicates whether to run the schedule every minute.
Possible values: {true, false}

jrs.minutes
Constant: jet.cs.util.APIConst.SCH_MINUTES
Description: indicates every how many minutes to run (when jrs.is_hourly is false and jrs.is_minutely is true).
Possible values: 1-999.

Note:  The property jrs.is_hourly has higher priority, that is, if you set both jrs.is_hourly and jrs.is_minutely to be true, the schedule will run the task based hour. 

Properties about jrs.is_between

jrs.hour
Constant: jet.cs.util.APIConst.SCH_HOUR
Description: indicates the start hour of a period of time (when jrs.is_hourly is true, jrs.is_between is true).
Possible values: 1-12hour

jrs.min
Constant: jet.cs.util.APIConst.SCH_MIN
Description: indicates the start minute of a period of time (when jrs.is_hourly is true, jrs.is_between is true).
Possible values: 0-59minute

jrs.is_pm
Constant: jet.cs.util.APIConst.SCH_IS_PM
Description: indicates the start PM or AM of a period of time (when jrs.is_hourly is true, jrs.is_between is true).
Possible values: {true, false}

jrs.hour2
Constant: jet.cs.util.APIConst.SCH_HOUR2
Description: indicates the finish hour of a period of time (when jrs.is_hourly is true, jrs.is_between is true).
Possible values: 1-12hour default is 5.

jrs.min2
Constant: jet.cs.util.APIConst.SCH_MIN2
Description: indicates the finish minute of a period of time (when jrs.is_hourly is true, jrs.is_between is true).
Possible values: 0-59minute default is 0.

jrs.is_pm2
Constant: jet.cs.util.APIConst.SCH_IS_PM2
Description: indicates the finish PM or AM of a period of time (when jrs.is_hourly is true, jrs.is_between is true).
Possible values: {true, false}

jrs.is_after
Constant: jet.cs.util.APIConst.SCH_IS_AFTER
Description: indicates to run after the specific time (when jrs.is_hourly or jrs.is_minutely is true)
Possible value: true, false
Note: If the value is true, the specified time is represented by the properties of jrs.exe_year, jrs.exe_month, jrs.exe_day, jrs.exe_hour or jrs.exe_min.

jrs.is_before 
Constant: jet.cs.util.APIConst.SCH_IS_BEFORE
Description: indicates to run before the specific time (when jrs.is_hourly or jrs.is_minutely is true)
Possible value: true, false
Note: If the value is true, the specified time is represented by the properties of jrs.cease_year, jrs.cease_month, jrs.cease_day, jrs.cease_hour, jrs.cease_min or jrs.cease_sec.

Properties about tasks

Task:

Properties Values Properties Values Properties Values
jrs.task_class jet.server.schedule
.jrtasks.UpdateRptTask
jrs.expire_days any integar    
  jet.server.schedule
.jrtasks.PublishToDiskTask
Rst jrs.rst_dir any path under Resourse Tree    
  jrs.rst rst file name    
Html jrs.html_dir any path under Resourse Tree    
jrs.html html file name    
jrs.is_dhtml true/false      
jrs.is_multi_files true/false    
jrs.is_applet_chart true/false    
jrs.has_hyperlink true/false    
jrs.has_page_number true/false    
jrs.use_table true/false    
jrs.relative_font_size true/false    
jrs.drilldown true/false    
jrs.no_margin_html true/false    
jrs.web_browser 0 - IE    
   1 - Netscape      
Pdf jrs.pdf_dir any path under Resourse Tree      
jrs.pdf pdf file name      
jrs.no_margin_pdf true/false      
jrs.compress_image_pdf  true/false      
jrs.print_mode_pdf  true/false        
Text jrs.text_dir any path under Resource Tree     
jrs.text text file name      
jrs.is_norm_txt text file in standard data format      
jrs.delimiter any character  used in SDF (Standard Data Format) format      
jrs.is_repeat true/false      
jrs.udchar_width user defined width      
jrs.udchar_height user defined height      
jrs.is_quotemark true/false          
jrs.hasHeadFoot                    true/false          
jrs.txt_compress true/false    
Excel jrs.excel_dir  any path under Resource        Tree     
jrs.excel excel file name    
Ps jrs.ps_dir any path under Resource Tree      
jrs.ps ps file name      
jrs.no_margin_ps true/false    
Rtf jrs.rtf_dir any path under Resourse Tree      
jrs.rtf rtf file name    
jrs.no_margin_rtf true/false          
xml jrs.xml_dir any path under Resourse Tree          
jrs.xml  xml file name        
jrs.is_only_data true/false    
jet.server.schedule
.jrtasks.SendJRMailTask
jrs.jrmail + NUMBER integer and followed by its properties jrs.mailto mail address
      jrs.mailcc mail address
jrs.mailbcc mail address
jrs.mailsubject
subject for this mail
jrs.mailcomments any comment for this mail
jrs.mailformat
0 - HTML mail
  1 - Plain text mail
2 - HTML file as attachment
3 - PDF file as attachment
4 - JReport .rst file as attachment
5 - Delimited text as attachment
6 - PostScript File as attachment
7 - Excel file as attachment
8 - RTF file as attachment
9 -XML file as attachment
jrs.mailcompress true/false
jrs.udchar_width integer
jrs.udchar_height integer
jrs.no_margin_mail true/false
jrs.use_table_mail  true/false
jet.server.schedule
.jrtasks.SendMailTask
jrs.csmail + NUMBER integer and followed by its properties jrs.mailto mail address
 

  

  

 

  

  

 

  

  
jrs.mailcc mail address
jrs.mailbcc mail address
jrs.mailsubject subject for this mail
jrs.mailcomments any comment for this mail
jrs.mailattach + NUMBER integar and followed by the attached file
jet.server.schedule
.jrtasks.PrintRptTask
jrs.printer printer name and followed by its properties jrs.print.copies integer
      jrs.print.leftmargin integer and followed by its unit
jrs.print.rightmargin integer and followed by its unit
jrs.print.topmargin integer and followed by its unit
jrs.print.bottommargin integer and followed by its unit
jrs.print.unit unit name
jrs.print.customtray custom tray name
Public Properties
jrs.task_id task ID of a scheduled task 
*jrs.catalog catalog full path
*jrs.report report name 
jrs.param$ + PARAMETER_NAME parameter values 
jrs.param_values parameter values 
jrs.rpt_language report language 
jrs.rpt_encoding report encoding
jrs.db_user database user ID 
jrs.db_pswd database password 
jrs.jdbc_url JDBC URL 
jrs.jdbc_driver JDBC driver 
jrs.jdbc_connection_object the user's connection object 
jrs.wp where portion 
jrs.named_wp existed where portion in catalog 
**jrs.if_print true/false 
**jrs.printer printer name
jrs.notification_emails email notification list
jrs.success_notify true/false
jrs.fail_notify true/false
Note:

The two public properties marked with * are applied to the whole schedule tasks except the task property jrs.csmail + NUMBER.

Only the two public properties marked with ** are effective when you use the task property jrs.csmail + NUMBER.

Following are details for each property in the above table:

Properties about publishing to Versioning System

Properties about Publishing to File System

Properties about Publishing to Email

Properties in jrs.jrmail

Properties about publishing to printer

Users can select printer with the Properties:

Note: In this case, you must set the value for the following properties at the same time: jrs.print.leftmargin, jrs.print.rightmargin, jrs.print.topmargin, jrs.print.bottommargin and jrs.print.unit; Otherwise, it can not work smoothly.

Properties about notification

Properties about style groups

Examples

  1. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to versioning system periodically.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.hour2=5&jrs.task_class=
    jet.server.schedule.jrtasks.UpdateRptTask&jrs.is_between=true&jrs.is_weekday=
    false&jrs.launch_type=8&jrs.min2=0&jrs.is_pm=false&jrs.hour=9&jrs.is_pm2=
    true&jrs.param$PToday=May%2021%2c%201998&jrs.uid=admin&jrs.hours=
    1&jrs.is_hourly=true&jrs.at_min=0&jrs.days_id=0&jrs.day=1&jrs.param_file=true&
    jrs.timezone=CTT&jrs.min=0&jrs.param$TermsDays=30&jrs.expire_days=
    30&jrs.report=Invoice.cls&jrs.rpt_language=en&
  2. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to versioning system at Sat May 1 12:00:00 CTS 2006.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.task_class=
    jet.server.schedule.jrtasks.UpdateRptTask&jrs.launch_type=
    1&jrs.param$PToday=May%2021%2c%201998&jrs.uid=admin&jrs.exe_day=
    1&jrs.param_file=true&jrs.exe _month=5&jrs.timezone=CTT&jrs.exe_hour=12&jrs.exe_min=00&
    jrs.exe_year=2006&jrs.param$TermsDays=30&jrs.expire_days=30&jrs.report=Invoice.cls&
  3. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to versioning system immediately.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.task_class=
    jet.server.schedule.jrtasks.UpdateRptTask&jrs.launch_type=0&jrs.param$PToday=
    May%2021%2c%201998&jrs.uid=admin&jrs.param_file=true&jrs.param$TermsDays=
    30&jrs.expire_days=30&jrs.report=Invoice.cls
    &jrs.rpt_language=en&
  4. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to file system immediately.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.pdf_dir=%2fgrp_param&jrs.task_class=
    jet.server.schedule.jrtasks.PublishToDiskTask&jrs.rst=
    Invoice.rst&jrs.launch_type=0&jrs.param$PToday=May%2021%2c%201998&jrs.uid=
    admin&jrs.is_norm_txt=true&jrs.rst_dir=%2fgrp_param&jrs.is_applet_chart=
    false&jrs.param_file=true&jrs.html=Invoice&jrs.text=Invoice.txt&jrs.delimiter=
    &jrs.is_multi_files=true&jrs.text_dir=%2fgrp_param&jrs.param$TermsDays=
    30&jrs.report=Invoice.cls&jrs.pdf=Invoice.pdf&jrs.html_dir=%2fgrp_param&
  5. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to email immediately.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.jrmail1=jrs.mailsubject%3dreport
    %2520Invoice%26jrs.mailformat%3d4%26jrs.mailto%3dreader2%252c%2520reader3%26&
    jrs.task_class=jet.server.schedule.jrtasks.SendJRMailTask&jrs.jrmail0=
    jrs.mailsubject%3dreport%2520Invoice%26jrs.mailformat%3d0%26jrs.mailto
    %3dreader1%26&jrs.launch_type=0&jrs.param$PToday=May%2021%2c%201998&
    jrs.uid=admin&jrs.param_file=true&jrs.param$TermsDays=
    30&jrs.report=Invoice.cls&jrs.rpt_language=en&
  6. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to printer immediately.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.task_class=jet.server.schedule.jrtasks.PrintRptTask&jrs.launch_type=
    0&jrs.param$PToday=May%2021%2c%201998&jrs.uid=admin&jrs.param_file=true&jrs.param$TermsDays=
    30&jrs.report=Invoice.cls&
  7. Submit a schedule to publish the report /hsqlDemo/Tutorial.cat/Invoice.cls to versioning system immediately, and notify the user support1, support2, and support3 whenever success or failure.

    The URL:

    http://localhost:8888/jrserver?jrs.cmd=jrs.submit_schedule&jrs.catalog=
    %2fhsqlDemo%2fTutorial.cat&jrs.task_class=jet.server.schedule.jrtasks.UpdateRptTask&jrs.launch_type=
    0&jrs.param$PToday=May%2021%2c%201998&jrs.uid=admin&jrs.param$TermsDays=30&jrs.expire_days=
    30&jrs.report=Invoice.cls&jrs.success_notify=true&jrs.fail_notify=true&jrs.notification_emails=
    To%3A+support1@jinfonet.com%0D%0ACc%3A+support2@jinfonet.com%0D%0ABcc%3A+support3@jinfonet.com%0D%0A
  8. When a large report exceeds the specific running time, send the report result by Email when it is finished. 
    • JSP parameter specification
      jrs.catalog=%2fcatalog path%2fcatalog name
      jrs.report=report name
      jrs.timeout_send_email=true/[false]
      jrs.report_timeout=number (if timeout >number and jrs.timeout_send_email=true, send mail)
      jrs.mailto=mail address
      jrs.mailsubject=mail subject
      jrs.result_type=1 (HTML) or 2(PDF) or 3(Text) or 4(Excel) or 5(PostScript) or 6(Rich Text) or 7(Xml)
      jrs.mailcomments=mail content
      jrs.mailfrom=mail address of sender
      jrs.timeout_sendmail_message=the message which users customize

      When you use JSP to run a report without parameter:

      http://localhost:8888/jinfonet/tryView.jsp?jrs.cmd=jrs.try_vw&jrs.catalog=
      %2fhsqlDemo%2fTutorial.cat&jrs.report=employeelist.cls&jrs.timeout_send_email=
      true&jrs.report_timeout=05&jrs.mail"mailto:to=support@jinfonet.com&jrs.mailsubject=
      AboutTaskForTimeoutSendEmail&jrs.res">to=support@jinfonet.com&jrs.mailsubject=
      "TaskForTimeoutSendEmail&jrs.result_type=1&jrs.mailcomments=
      IFTHEREPORTISFINISHEDTHERESULTWILLBESENT

      When you use JSP to run a report with parameter:

      http://localhost:8888/jinfonet/runReport.jsp?jrs.cmd=
      jrs.web_vw&jrs.catalog=%2fhsqlDemo/Tutorial.cat&jrs.report=
      customerorders.cls&jrs.timeout_send_email=
      true&jrs.report_timeout=0&jrs.mailto=
      support@jinfonet.com&jrs.mailsubject=AboutTaskForTimeo">mo%2fTutorial.cat&jrs.report=
      customerorders.cls&jrs.timeout_send_email=true&jrs.report_timeout=5&jrs.mailto=
      support@jinfonet.com&jrs.mailsubject=TaskForTimeoutSendEmail&jrs.result_type=1
    • Servlet parameter specification
      jrs.cmd=jrs.try_vw (when the report has no parameter)
      jrs.cmd=jrs.web_vw (when the report has parameter)
      jrs.timeout_send_email=true/[false]
      jrs.report_timeout=number (if timeout >number and jrs.timeout_send_email=true, send mail)
      jrs.mailto=mail address
      jrs.mailsubject=mail subject
      jrs.result_type=1 (HTML) or 2(PDF) or 3(Text) or 4(Excel) or 5(PostScript) or 6(Rich Text) or 7(Xml)
      jrs.mailcomments=mail content
      jrs.mailfrom=mail address of sender
      jrs.timeout_sendmail_message=the message which users customize

      When you use Servlet to run a report without parameter:

      http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/CountRecorderPerPage.cls?jrs.cmd=
      jrs.try_vw&jrs.timeout_send_email=true&jrs.report_timeout=1&jrs.mailto=
      support@jinfonet.com&jrs.mailsubject=AboutTaskForTimeoutSendEmail&jrs.result_type=
      1&jrs.mailcomments=COUNTRECORDSPERPAGE

      When you use Servlet to run a report with parameter:

      http://localhost:8888/jrserver/hsqlDemo/Tutorial.cat/customerorders.cls?jrs.cmd=
      jrs.web_vw&jrs.timeout_send_email=true&jrs.report_timeout=1&jrs.mailto=
      support@jinfonet.com&jrs.mailsubject=TaskForTimeoutEmail&jrs.result_type=
      1&jrs.mailcomments=CUSTOMERORDER
    • Customize your message which will display in browser

      You can set your desired message by setting the parameter "jrs.timeout_sendmail_message"

      For example, you want to display message as below:

      Running <report name> costs 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} costs 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/hsqlDemo/Tutorial.cat/customerorders.cls?jrs.cmd=jrs.web_vw
      &jrs.timeout_send_email=true&jrs.report_timeout=0&jrs.mailto=support@jinfonet.com
      &jrs.mailsubject=AboutTaskForTimeoutSendEmail&jrs.result_type=1&jrs.mailcomments=Customerorder
      &jrs.mailfrom=support@jinfonet.com&jrs.timeout_sendmail_message=

      This {6} is a larger report whose runtime is over {0}<p>.I send the report to {1}. <p> I am {5}.The subject of the mail is {2}.<p> It''s type is {3}.

      Note: When the sign " ' " is used in the message, you should type the sign twice. For example, the message " Its subject is {2}" will be displayed as "Its subject is AboutTaskForTimeoutSendEmail".

Index