Posts by hebertrfreitas • 593 points
24 posts
-
0
votes1
answer38
viewsA: How to take advantage of the consultation in two separate layouts reports?
jasperreports has the concept of Datasources, where you can assemble the data source of your report from various formats and send it to your reports. You need to execute a code that returns some…
-
1
votes2
answers154
viewsA: Value selected by selectOneMenu comes null
I believe the problem is at the moment you are evaluating the variable. The method handleFileUpload is called immediately after uploading the file and at this time as its entire form has not been…
-
2
votes1
answer44
viewsA: I cannot delete data from an entity
Based on the stack trace error it seems to me that at some point you are trying to delete a pessoa and she is still referenced by a protocolo. Watch the next row of your stack trace: Grave: 143318…
-
1
votes1
answer166
viewsA: Report to Jasperreports returning blank pdf table
Check that the sources used by the report are available on the server. To not be dependent on the sources available on the server you can use the Jasper Extension fonts and generate a jar containing…
-
1
votes1
answer841
viewsA: SUM conditional Jasper Reports
Create a variable in your report by placing the field Calculation for Sum and the countryside Value Class Name for java.lang.Integer. On the field Expression place the following condition:…
-
1
votes1
answer105
viewsA: Problems in displaying the report with Jasperreport
The first thing you should do is test to see if your Rest API is returning the data correctly. To return a file via Rest using Jax-RS you can do this way: @GET @Path("/relatorio")…
-
0
votes0
answers102
viewsQ: Data Modeling - Relationship Optional
I need to do a database modeling for the following scenario: One Task(which is a ticket, a service request) will always have a Address, which is where this task will be attended to. To Task may be…
-
1
votes1
answer791
viewsA: Upload photo in java form
If you are using primefaces, probably the best way is to use the same upload file. I believe the example of documentation is enough to start using.…
-
1
votes1
answer329
viewsA: Jasperreports report with multiple parameters
There are a few ways to do what you want in Jasper Reports: 1 - Continue using the query in the report and pass a list of clients as parameter You today pass as parameters a map where you inform:…
-
1
votes1
answer75
viewsA: "Error: Can not Issue data Manipulation statements with executeQuery()" no Select
The mistake No value specified for parameter 1 usually occurs when you have a query that expects a certain parameters but this parameters is not being passed. In the code presented above you entered…
-
1
votes1
answer389
viewsA: Working with Javaweb Dates
JSF is a base Component framework, meaning it works with components in the view. Usually some component library is used that expands the possibility of components and facilitates development. A very…
-
1
votes3
answers1429
viewsA: Edit an already created XLS file
Using the Apache Poi library you can do one of the following: XSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(caminho)); OR Workbook wb = WorkbookFactory.create(new File(caminho)); Where…
-
1
votes1
answer1027
viewsA: cannot be cast to java.lang.String autocomplete primefaces
This is probably some error in converting, try to do the following In class ClienteConverter substitute @FacesConverter(forClass = Cliente.class) for @FacesConverter("ConverterTeste") and add to the…
-
10
votes2
answers6061
viewsA: Query specified Join fetching, but the Owner of the fetched Association was not present in the select list
The solution to this problem is that when performing a JOIN FETCH one should start doing the FETCH from the first relationship, in my case the query would be as follows: Treinamento retorno = null;…
-
5
votes2
answers6061
viewsQ: Query specified Join fetching, but the Owner of the fetched Association was not present in the select list
I have a scenario with the following entities:Treinamento, Curso and Aulas. A Treinamento has a relationship ManyToOne for Curso. And Aula has a relationship ManyToOne for a Curso. I want to perform…
-
2
votes1
answer722
viewsA: Javascript in JSF page - Primeface
To upload files using primefaces usually uses the file upload component. Here is an example of how it could be written: <h:form> <p:fileUpload value="#{beanController.arquivoAula}"…
-
1
votes1
answer463
viewsQ: Lifecycle of @Applicationscoped at Ear
I have an application with several WEB modules and an EJB inside an EAR as shown below: In the EJB module I created a class annotated with @ApplicationScoped, my goal is for this class to store…
-
0
votes1
answer84
viewsQ: Pass user authentication between different contexts
I have three java web(.War) projects with different contexts within the same EAR. I need the user to authenticate in an application and then I traffic this information from it among the other…
-
4
votes1
answer73
viewsQ: Split by the | character does not return all expected elements
I have a file with lines similar to the one below: 42|a|b|c|d||f||h||||||||||||||||||| I need to split by character | then my code does it like this: String linha42 =…
javaasked hebertrfreitas 593 -
0
votes1
answer106
viewsA: Jasperreports - Is it possible for a report to be automatically listed several times?
If there are multiple reports and you just want to export them all together you can use the example of batch export from Jasper as per this link:…
-
3
votes1
answer392
viewsQ: JPA/Hibernate Entity with Collection for itself
Hello, I have an entity called menu in my system. A menu can be child of another menu and so on. The table has the following structure: The entity is mapped as follows: @Entity…
-
0
votes2
answers1479
viewsA: Sources in jasperreports reports on wildfly
I managed to solve my problem. I discovered that when creating the jar with fonts customized by Ireport or Jaspersoftstudio we cannot name fonts that have spaces. In my case for example I was…
-
0
votes2
answers91
viewsQ: Secure authentication between different systems
My scenario is the following: A php system authenticates the user and should call my application (Java) stating which user this is. My application does not authenticate this user, it only receives…
-
0
votes2
answers1479
viewsQ: Sources in jasperreports reports on wildfly
I have a java web project that runs on a linux server. This project has reports created in Ireport with custom fonts, but these fonts are not displayed when I call the reports in this project. I…