Creating a report request received event URL

Use the information in this section to create a valid Report Request Received Event program and to define the URL in Reporting Services. Reporting Services will invoke the Report Request Received event for all report requests, including scheduled report.

In addition to the request parameters that Reporting Services always passes to your event program, you can have Reporting Services pass user-defined request parameters by concatenating them to the URL value as a query string. The following example contains a query string that passes the user-defined request parameter mytestgroup and its value: http://myHost:9000/context/ParameterValidator?mytestgroup=finance.

Reporting Services will invoke the URL defined for this event's user-defined program as a GET method. Reporting Services will wait for a response from the event's user-defined program before it further processes this report request.

Before using variables as a part of the URL value, note the following:

  • Variables are case-sensitive.
  • You must use the at sign (@) before the variable. You must type double angle brackets around the variable. For example, <<@your_variable>>.
  • You can only specify user variables that are defined as the literal type.
  • You can specify system variables that are shipped with the Reporting Services product.

Reporting Services Passed In Request Parameters

This table shows the request parameters that Reporting Services automatically passes with the URL that you specify.

Parameter Description
reportname This request parameter represents the name of the report given when it was published to the Reporting Services repository.
fsuserid This request parameter represents the name of the Reporting Services user requesting to view the report.
remurl2 This request parameter represents the URL that the user-defined event program invokes to return to Reporting Services. The value of this request parameter consists of the URL value needed to return to Reporting Services and a URL query string containing a unique Reporting Services request parameters that allows Reporting Services to continue processing the original report request.

Reporting Services values to be passed back to Reporting Services

A user defined program must return the value from the passed remurl2 request parameter. This table shows the response items to pass back to Reporting Services as a single concatenated string value.

Item Description
status Set the status value to zero (status=0) if passed in report parameters have been validated and the user wants to view the report.

Set the status to a non-negative value greater than zero when the validation has failed and you want to display an error message to the user.

message Optionally, the message item contains the text describing the error corresponding to the status. When activated, Reporting Services displays the error message View screen.

The items passed back to Reporting Services must be passed back as a concatenation to the query string of the remurl2 defined URL value. The items are added to the query string following the HTTP specifications (for example, name=value connotation and the use of the ampersand (&) character as delimiter to separate multiple items).

This is a code sample:

// Get the URL value to return back to LBI ERS from the 
HttpServletRequest (request) object.
String returnURL = request.getParameter("remurl2");

// Did not find an error during report parameter selection, 
// so define status as passed.  
// Adding a message is optional for the pass condition – LBI ERS 
// will ignore the message if the 
// status is returned as passed. 
String returnURL = returnURL + "&status=0&message=Report Request 
Received event passed";

// Return back to the LBI ERS web application by using the 
// sendRedirect(String URL) method of
// the HttpServletResponse (response) object.