javier.ggi90
-
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
-
-
You can add the following to the end of the URL:
&j_username=jasperadmin&j_password=jasperadmin
Substituting "jasperadmin" with whatever user and password you want.
-
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
-
I know it is 5 years later but has anyone found the solution for this?
-
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:
- Making a parameter a whole string and using that as a single filter, but I get errors when running the report.
- 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
-
Try passing slSchema and slFactory parameters into the subreport(s). Make sure these exist in the main report and in every subreport.
-
Another thing that might be affecting is if you are not mapping the parameters from the main report into the subreport which would cause the subreport to be blank. To do this you need to create the parameter in the main report and then in the subreport properties look for the "parameters" option and map them there.
-
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.
-
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 moreCaused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT tokenat [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 -
I'm not sure about this specific statement but it should be possible. I have done similar things using MySQL and Oracle with CASEs instead of IFs.
As an alternative, you can also do this in a view or stored procedure and call it from the report query.
-
You can try the following:
- In the main report query: "SELECT 1"/"SELECT 1 FROM DUAL"/what ever in the language you are using
- Create the subreports and in their properties change the Connection Type property to 'Use a connection expression'
- 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.
-
Can you give us more information? Is this error on a variable, if so can you give us the code for that variable for example. This error can appear for a variety of reasons.
-
Jasper does not sort the results of the query (or whatever your data is coming from), can you try sorting the data?
-
You can concatenate fields, variables and parameters by using the plus (+) sign. Pipes are used as the OR conditional.
-
Probably the datasource is being consumed entirely before generating the subreport, what type of datasource are you using?
-
What type of datasource are you using? (JSON, CSV, JDBC)
-
Yes, you can export each subreport into different sheets. What you can do is add a page break between subreports and add the following property: net.sf.jasperreports.export.xls.one.page.per.sheet and set its value to true.
-
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 reportsThanks in advance, if you need further explaining please tell me, I sometimes have difficulties explaining myself :)
Javier
-
You can try assigning the parameter a default value. This can be a String, number or any other variable. The only problem is that this only works for a single set of values.
-
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.
-
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
-
Try something like this instead:
$V{DID_BW}==0 && $V{DID_Colour}==0 ? 0 : $V{DID_Copy}/($V{DID_BW}+$V{DID_Colour})
? = THEN
: = ELSEFor future references, you can also nest them.
How I insert a subtotal row when the data change in some column
in Products
Posted
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