Creating a parameter selection event URL

Use the information in this section to create a valid Parameter Selection Event program and to define the URL value in Reporting Services. If there is a Parameter Selection Event defined, Reporting Services will use the URL value entered in the URL field for the Report Event.

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 only specify request variables.

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 the user’s callback 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 application must return the value from the passed remurl2 request parameter as well as pass every selected report parameter name and value. 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 the report parameters have been successfully selected.

Set the status to a non-negative value greater than zero when the selection 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 a 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");

// Add the selected report parameters and their values to the end of 
// the return URL.  In this the report parameter names are Company 
// and Dept and have the values Lawson and HR respectively.
returnURL = returnURL + "&=Lawson&=HR";

// 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&=Report Parameter 
Selection passed";

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