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

javier.ggi90

Members
  • Posts

    74
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by javier.ggi90

    1. Add a group band and  add both fields in the Expression ($F{Oficina} + $F{Localizacion}, for example).
    2. You have to sort the data manually at this point either from the query (ORDER BY) or in the "Sort Fields" option in the report's outline.
    3. Add the group footer and design the "Subtotal" line you want to add there.

    Note that this is assuming that you need to add that line when Oficina OR Localizacion change. If you need it to be when Oficina AND Localizacion change, then you need to create two groups, one for each field, and add the footer for Oficina.

     

    Regards,

    Javier

  1. I did not know anything about filter expressions, good to know they are there and I can try them next time so thanks for the info Wayne.

    I found a "solution", I used the following:

    (FIELD == Parameter or ParameterBool == 1) and (FIELD2 == Parameter2 or ParameterBool2 == 1) and ... (FIELDn == Parametern or ParameterBooln == 1)

    This is something I had tried before but got errors, the catch is that this does not work in Studio or iReport, it has to be run directly in the server which I had not done before.

     

    Javier

  2. Hi all, so I need to do something like this: filter a report by ID if the user passes it along but show all data in the user leaves this blank. I have tried several approaches, including:

    1. Making a parameter a whole string and using that as a single filter, but I get errors when running the report.
    2. Making a kind of boolean operations as this: (FIELD == Parameter or ParameterBool == 1) where ParameterBool will be 1 if Parameter is null and 0 if not null. This also gives errors when running.

    Anyone knows a way to achieve this?

     

    Thanks,

    Javier

  3. I remember something like that happened to me and I solved it adding a query into the main report. That is why I suggested step one from my answer so that you do not have to bring any data from the data source and don't affect performance.

    Also, using $P{REPORT_CONNECTION} means you will use the datasource from the main report in the subreport. If that is what you intend, by all means leave it like that.

  4. Hi all, so I am creating domain based reports in Jaspersoft Studio for the first time and encountered a problem. I can use many fields with different data types such as strings, doubles, integers, dates, etc. but there are very specific fields of several data types that I cannot call or else I get the following error (on the bottom is the full error message):

    net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: javax.ws.rs.ProcessingException: Error reading entity from input stream.

    I got this error by adding an Integer field which I can use in AdHoc views and reports in the server.

    Anyone has any idea on what this is or how I can solve it?

    EDIT: I just tested this in JasperServer and it seems it is not working there either. The error I get is the following: Problem parsing expression 'Sum(Compras.kardex.in)' any idea why can this be happening? I am certain the field IS a number from the datasource and even Studio detects it as an Integer.

    net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: javax.ws.rs.ProcessingException: Error reading entity from input stream.
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:524)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:499)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:380)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    Caused by: net.sf.jasperreports.engine.JRException: javax.ws.rs.ProcessingException: Error reading entity from input stream.
    at com.jaspersoft.studio.server.domain.conn.DomainQueryExecuter.createDatasource(DomainQueryExecuter.java:229)
    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1129)
    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:696)
    at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:437)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:526)
    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:119)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: javax.ws.rs.ProcessingException: Error reading entity from input stream.
    at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:866)
    at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:810)
    at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:368)
    at org.glassfish.jersey.client.InboundJaxrsResponse$2.call(InboundJaxrsResponse.java:122)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:399)
    at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:119)
    at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleErrorDescriptorList(RESTv2ExceptionHandler.java:87)
    at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleErrorDescriptor(RESTv2ExceptionHandler.java:113)
    at com.jaspersoft.studio.server.protocol.restv2.RESTv2ExceptionHandler.handleException(RESTv2ExceptionHandler.java:59)
    at com.jaspersoft.studio.server.protocol.restv2.ARestV2ConnectionJersey.toObj(ARestV2ConnectionJersey.java:52)
    at com.jaspersoft.studio.server.domain.protocol.RestV2.executeQuery(RestV2.java:147)
    at com.jaspersoft.studio.server.domain.protocol.DomainProxy.executeQuery(DomainProxy.java:41)
    at com.jaspersoft.studio.server.domain.DomainManager.executeQuery(DomainManager.java:85)
    at com.jaspersoft.studio.server.domain.conn.DomainQueryExecuter.createDatasource(DomainQueryExecuter.java:226)
    ... 6 more
    Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
     at [source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@5d0298c8; line: 1, column: 1]
    at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:148)
    at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:749)
    at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:745)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:275)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:216)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:206)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
    at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1232)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:676)
    at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:808)
    at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:264)
    at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:234)
    at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:154)
    at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1124)
    at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:851)
    ... 22 more
     
  5. You can try the following:

    1. In the main report query: "SELECT 1"/"SELECT 1 FROM DUAL"/what ever in the language you are using
    2. Create the subreports and in their properties change the Connection Type property to 'Use a connection expression'
    3. In the Connection Expression property open a new connection to your datasource, for example if MySQL (NOTE: the following are two different examples because iReport and JasperServer function different and as so need different expressions. If you are testing in iReport use the first expression, if testing in JasperServer use the second one):
      • com.jaspersoft.ireport.designer.utils.Misc.getConnection("{Data Source Name}")
      • java.sql.DriverManager.getConnection("jdbc:mysql://hostname:3306/dbname","user","password")

    Repeat step 3 for each subreport you are using.

  6. Hi all,

    So I have three Jasper servers and I want to know if there is a way to configure the buildomatic tool to achieve something like this:

    - Have three buildomatic folders, one for each server in my local PC
    - Change something so that each of them points to a specific JasperServer when importing/exporting reports

    Thanks in advance, if you need further explaining please tell me, I sometimes have difficulties explaining myself :)

     

    Javier

  7. If I understand correctly, what you need is to create a new role in the Jasper environment, asign that role to the respective user and lastly change the permissions of a specific piece of data, a report lest say, to the newly created role.

  8. Not sure if you can do this in a report, but you can create a view or stored procedure and call specific fields using the function:

    EXTRACTVALUE(name_of_the_field, 'path to the value')

    The path of the value should be something as this: name_of_field/value/value/etc

×
×
  • Create New...