Jump to content
We've recently updated our Privacy Statement, available here ×

Is this a bug in the MultiSelect Input Parameter in JasperReports Sever 7.2.0 using Rest Api?


mmmartins

Recommended Posts

My report using an MultiSelect Input Parameter:

Parameter in JrXml:

<parameter name="List" class="java.util.List" nestedType="java.lang.String">
</parameter>

I use Rest Api for report generation.

The following requests are executed.

<Server>/rest_v2/resources/reports/ReportExample_files/List_files/List?overwrite=true

Json:

{"version":13,"
permissionMask":1,
"creationDate":"2019-10-28T10:00:25",
"updateDate":"2019-10-29T17:51:57",
"label":"lov_Lists",
"uri":"/reports/ReportExample_files/List_files/List",
"items":[{"label":"List0","value":"DDD"},{"label":"List1","value":"AAA"},{"label":"List2","value":"BBB"},{"label":"List3","value":"CCC"}]
}

<Server>//rest_v2/reportExecutions

Json:

{"reportUnitUri": "/reports/ReportExample",
"async": true,
"freshData": true,
"saveDataSnapshot": false,
"outputFormat": "pdf",
"interactive": false,
"ignorePagination": false, 
"parameters": {"reportParameter": [{"name": "List", "value": ["DDD","AAA","BBB,"CCC"]}]}
}

In versions earlier than 7.20, when running the report via rest api, the List parameter values in JrXml are as follows:

$P{Lista}.toArray()[0] --> "DDD"
$P{Lista}.toArray()[1] --> "AAA"
$P{Lista}.toArray()[2] --> "BBB"
$P{Lista}.toArray()[3] --> "CCC"

In version 7.2.0, the List parameter values in JrXml are as follows:

$P{Lista}.toArray()[0] --> "AAA"
$P{Lista}.toArray()[1] --> "BBB"
$P{Lista}.toArray()[2] --> "CCC"
$P{Lista}.toArray()[3] --> "DDD"

I also tested the following cases:

Using SERVICE jobs via Rest Api and scheduling the report, the 
List parameter values in JrXml are as follows:

$P{Lista}.toArray()[0] --> "DDD"
$P{Lista}.toArray()[1] --> "AAA"
$P{Lista}.toArray()[2] --> "BBB"
$P{Lista}.toArray()[3] --> "CCC"

Running the report on JasperReports Server manager the List parameter values in JrXml are as follows:

$P{Lista}.toArray()[0] --> "DDD"
$P{Lista}.toArray()[1] --> "AAA"
$P{Lista}.toArray()[2] --> "BBB"
$P{Lista}.toArray()[3] --> "CCC"

 

This different behavior between versions when running the report via Rest Api is generating information that compromises the report result.

Is this a bug? Is there a way around this case?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...