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

philippw

Members
  • Posts

    4
  • Joined

  • Last visited

philippw's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Answer related to https://community.jaspersoft.com/questions/1108816/collection-parameter-nestedtype-integer-empty
  2. Answering my own question. We found out that we need an input control (multi-select query based input control) linked to the report in order to let the collection type parameter use the values that we pass via URL. Example url: http://localhost:8080/jasperserver/rest_v2/reports/reports/Test/TestCollection.html?P_List=123&P_List=456 So what we needed was to add an input control to our TestCollection-Report with the following query: SELECT myNumber FROM myTable[/code]As a result the collection type parameter can use the predefined values and use them later on in an IN-Clause in the main query in our report: SELECT *FROM myTableWHERE$X{IN, myTable.columnname1, P_List}AND myTable.columnname2 = $P{pAnotherParameter}[/code]For me that feels redundat, as we need to query the table two times, which works, but since there are many records in this table, it still needs some time to execute the query just for the list of possible values in the input control. Does anyone have had this issue before? How did you work around this? Kind regards, Philipp
  3. Hello everyone, we are currently trying to test some functions within the rest_v2 API. We are using Postman (desktop application) or directly via url input in browser. Therefore we created a small sample report with a collection type parameter P_List and a field to display the content of the parameter. When we try to pass some values to the report: http://localhost:8080/jasperserver/rest_v2/reports/reports/Test/TestCollection.html?P_List=ABC&P_List=DEF the result field is always empty. In Jasperstudio it works fine. Help is very much appreciated! Kind regards, Philipp
  4. Hallo everyone, we started working with jasperreports and use the jrs-rest-java-client libraries to create our reports. We now stumbled across a problem using an java.util.ArrayList as a parameter within an IN-clause: select *from tablenamewhere$X{IN, tablename.columnname1, pListParameter}and tablename.columnname2 = $P{pAnotherParameter}[/code]It works fine with the default expression for the pListParameter in jaspersoft Studio new ArrayList(Arrays.asList(new String[]{"Smith","Miller","Bush"}[/code]So the report uses the correct IN-clause and therefore the parameter. Now when i try to pass an ArrayList in Java (using the above mentioned jrs-rest-java-client library), single parameters get passed fine, but the ArrayList is not working. Part of the java code is: import com.jaspersoft.jasperserver.dto.common.PatchDescriptor;import com.jaspersoft.jasperserver.dto.resources.ClientReportUnit;import com.jaspersoft.jasperserver.jaxrs.client.core.JasperserverRestClient;import com.jaspersoft.jasperserver.jaxrs.client.core.RestClientConfiguration;import com.jaspersoft.jasperserver.jaxrs.client.core.Session;import com.jaspersoft.jasperserver.jaxrs.client.core.enums.AuthenticationType;import com.jaspersoft.jasperserver.jaxrs.client.core.enums.JRSVersion;import com.jaspersoft.jasperserver.jaxrs.client.core.enums.MimeType;import com.jaspersoft.jasperserver.jaxrs.client.core.operationresult.OperationResult;//code shortened... private String parametername = ""; private List<String> parameterMap = new ArrayList<String>();//code shortened... System.out.println(parameterMap.toString());//this does print out [smith, Miller, Bush]//reportPath is the URL for the report inside the jasperserver//format is e.g. PDF OperationResult<InputStream> result = session .reportingService() .report(reportPath) .prepareForRun(format.toUpperCase()) .parameter(parametername, parameterMap) .run();[/code]Does anyone have an idea where to look? Is there a way to log the resulting query string in jasperserver? Thanks in advance! Greetings, Philipp
×
×
  • Create New...