Jump to content

JasperServer and liferay integration - default rpt


kapokfly

Recommended Posts

Does anyone know how to display different default report for the multiple jasper server instances deployed to liferay portal?

 

My requirement:

1) 1 liferay portal installation

2) 1 jasperserver installation out of liferay portal

3) integrated jasperserver and liferay via the war provided by jasper and display report list without issue

4) Added 4 jasper server portlets from the portal but all of them are displaying the report list

 

is there anyway we can make it displaying different report, by default?

 

 

thanks!

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

I found out that you can do this through the portlet configuration. Here is a section of the new admin guide.

 

By default, the portlet displays all the reports that the current user is allowed to view. You can configure the portlet to display
a specific report, instead.

In the portlet.xml file, add the following entries to specify a default report:

  • full_resource_path: This parameter specifies the full report Path.
  • resource_type: The only supported value is report
  • number_of_parameters: This specifies the number of parameters the report requires, including optional and required parameters.
  • js_resource_parameter_<parameter>: For each parameter of the report, append prefix js_resource_parameter_ to the name. In this example, the report /reports/samples/EmployeeAccounts takes a parameter named EmployeeID; it is defined as  js_resource_parameter_EmployeeID.
  • modifiable: This value has to be 1 [one] so end users can choose different reports at run time. 1 is the only supported value. For details of this parameter, please refer to the JSR-168 specification.


For example, the portlet configuration section of the portlet.xml file might be similar to the XML seen below.

 

Sherman

Jaspersoft

Code:
<portlet-preferences>  <preference>    <name>full_resource_path</name>    <value>/reports/samples/EmployeeAccounts</value>    <modifiable>1</modifiable>  </preference>  <preference>    <name>resource_type</name>    <value>report</value>    <modifiable>1</modifiable>  </preference>  <preference>    <name>number_of_parameters</name>    <value>1</value>    <modifiable>1</modifiable>  </preference>  <preference>    <name>js_resource_parameter_EmployeeID</name>    <value>beth_id</value>    <modifiable>1</modifiable>  </preference><portlet-preferences>
Link to comment
Share on other sites

  • 2 weeks later...
  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...