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

erikmarbad

Members
  • Posts

    51
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by erikmarbad

  1. Hello, I already do the name + value part with the following instruction: atributos.put(new JSONObject().put("name", "kokoko").put("value","yoyoyo"));
  2. I am trying to add attributes to a user via rest_v2, I have managed to add the roles of this user, but his attributes have not, any help on why the following does not work for the attributes? JSONArray roles = new JSONArray(); JSONArray atributos = new JSONArray(); roles.put(new JSONObject().put("name", "ROLE_USER").put("name", "ROLE_PRUEBA")); //Solo para crear el usuario atributos.put(new JSONObject().put("name", "kokoko").put("value","yoyoyo")); JSONObject jsonBodyInfo = new JSONObject(); try { //jsonBodyInfo.getJSONObject(user).remove(user); Para eliminar un usuario (Se ignora lo demas) jsonBodyInfo.put("fullName", user); jsonBodyInfo.put("enabled", enabled); jsonBodyInfo.put("password", pwd); jsonBodyInfo.put("roles", roles); jsonBodyInfo.put("attribute", atributos); } catch (JSONException e) { }
  3. What version do you use and what changes did you make to the program after installing it?
  4. This problem can be solved in different ways but it will depend on how your report is made, for example, a way would be following the example offered by the documentation: https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v790/creating-new-report Although the solution of the query is useful, it is always good to know other alternatives (Generally all problems of this style are due to a bad organization of the report) because a query does not always fix the problem.
  5. The case is the following, there is a user who is not doing anything on the server, I as an administrator, to avoid losing memory in vain, I want to forcefully close the session, is there any way to achieve this?
  6. The idea is to hide everything that the menu contains (in fact, that section does not even appear) for all users except for the administrator
  7. I have the following doubt, how recommendable it is to use a global user so that all the people in the company execute a report, I ask this because I am using rest_v2 to generate reports, the problem is in the logoff, since although only run the report the user remains in session until his session on the server expires, so it occurred to me to keep a single user in session 24/7 and that with that user everyone executes their reports, this is a good or bad practice ?
  8. I'm following this person's tutorial to implement token usage in JasperReports Server: https://github.com/mehulkatara/Jasper-Token-based-Authentication/tree/master/With%20encryption%20mechanism My problem is how to modify the .class file, I leave a post I made on stackoverflow looking for a solution on this. https://stackoverflow.com/questions/72650201/update-the-class-file-of-an-exported-project-in-eclipse How did you do to achieve this? I am in the process of putting the jar cipher in the lib folder, but for that I need to modify the above, I appreciate an answer on this.
  9. The case is as follows: The company has a web portal in which Jasper reports are currently generated, for certain reasons it has been decided to use JasperReports Server (8.0.0 community edition) to generate reports, so as not to make an abrupt change between the web portal and JasperReports Server It has been decided to establish a joint work, that is, in the web portal the parameters or input controls of the report will be entered, then this information is sent to Jasper Server to subsequently generate the pdf or excel, the way in which we send the information is through a URL like the following: http://jasperadmin:jasperadmin@localhost:8080/jasperserver/rest_v2/reports/reports/MA032.pdf?AMB=yyyy What we do is build the url dynamically, we successfully bring the report in question with the correct information, we still look for a way to hide the username and password. The problem lies in making the user's session close immediately after the report is executed because the user remains in the session after executing the report, for this we have not found a solution in this regard, so we have thought of 2 alternatives, the first is shorten the time of inactivity of a user on the server, so that, for example, if 2 minutes pass after executing the report, it will be later removed from the server, and the second is to maintain one user per area for an indefinite time, that is, each area in the company will have a username and password, so that the users belonging to each area when generating the reports will use the credentials of their respective area . How good are these solutions?
  10. I am sending the credentials of a user via Rest_v2 with the following link to run a report, after running the report in theory the user session should be closed to release resources but I don't know how to do it, any help on this? http://user:user@localhost:8080/jasperserver/rest_v2/reports/reports/MA032.pdf?AMB=yyyy
  11. I am using the community version of JasperReports Server 8.0.0, and I am calling a jasperserver report from an external application, the problem is that to call the report I must pass the credentials of a user and these are VISIBLE, I need to make them not and I have seen and browsed many pages and videos on the internet but either they do not provide the source code or they have errors, in addition, the documentation in this aspect is poor, so I would like a detailed answer that includes a precise description of everything, if it includes the files to which it refers would also be better, it doesn't matter if it is to hide, encrypt or use tokens in the credentials, although I am asking too much, when looking for a solution I realized that this problem is more common than it seems , so this would benefit more than one person. I greatly appreciate the reply in advance.
  12. Ok since the problem occurs as soon as you click on the report, possibly the problem is in one of these aspects: - SQL code - Routes - Means - Input control mapping error Verify that the SQL code is valid for JRS, you can test this with other reports you have on the server and see if the clauses you place work or not. Check that all the paths are correct, I still have a hard time understanding why you don't have the images in the Images folder. Verify that all the resources that will be used in the report are in the report, you can find this out by selecting the report, clicking on edit and then on controls and resources. If at the time of uploading the report I assign those parameters to existing input controls on the server, check that they have the same ID.
  13. If you are going to make a list, you must do it from JRS in the input controls, outside of Jaspersoft Studio this parameter will not take any value. <parameter name="Products" class="java.util.List"> <defaultValueExpression><![CDATA[new ArrayList()]]></defaultValueExpression> </parameter>
  14. By the way, those kind of errors where the report works in Jaspersoft Studio but not in JasperReports Server is usually due to issues with paths or SQL code (JasperReports Server doesn't support all expressions that work in Jaspersoft Studio, an example is the WITH clause, which to make it work you either have to restructure the SQL code or you can also alter the JRS source files)
  15. Where do you have the images stored? If you have them in the Images folder, then you are passing the wrong path. It should be something like repo:/images/logo.jpg Does the error occur before running the report or after running it?
  16. In the same way I also downloaded these files, but as I indicated at the beginning I do not know how to use them, if you could provide me with a detailed explanation, I would greatly appreciate it Note: I am using JRS Community
  17. bdraifi thanks for the answer, however, my problem is how to start using that client, since I have never used one, I already have reports uploaded to JRS, as a starting point I would like to call and execute a report, in the following image I show that I already have the client placed in NetBeans, but I am presented with 2 things, the first is that it tells me that I am missing dependencies: Failed to execute goal on project jrs-rest-java-client: Could not resolve dependencies for project com.jaspersoft:jrs-rest-java-client:jar:8.0.0: Failed to collect dependencies at com.jaspersoft.jasperserver:jasperserver -dto:jar:8.0.0: Failed to read artifact descriptor for com.jaspersoft.jasperserver:jasperserver-dto:jar:8.0.0: Could not find artifact com.jaspersoft.jasperserver:server:pom:8.0.0 in jaspersoft -clients-snapshots (https://jaspersoft.jfrog.io/jaspersoft/jaspersoft-clients-releases) -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. The second thing is that after solving the previous problem, what should I do to call the report? for example if I should create a JAVA file and where to place it, and finally what exactly to put in the lines of code to execute the report. My problem lies in how to start, if I can be clear with that, I can solve the rest on my own.
  18. The above is a REST client for JasperRepors Server, its documentation is at: https://github.com/Jaspersoft/jrs-rest-java-client The problem is that I can't find an explanation for how to start, in my case, I've been working with JAVA, JSP, DB2 and JDBC as the main technologies to run reports, but now I'm looking to use JasperReports Server to view the reports, but I can't find a detailed explanation to start, for example, create a project, add dependencies, create a java application, add this, add the other, etc., the main features that should be counted on, are that obviously you can view the reports and The other thing is that users can be modified (mainly their password), I appreciate an explanation about this in advance.
  19. I am trying to preview a JasperReports Server report through Axios, the problem is that when I run it (localhost:port) it keeps loading and does nothing. I have followed the following tutorial: const express = require('express') const axios = require("axios") const app = express() app.get('/', async function(req,res){ try { const url = "http://localhost:8080/jasperserver/rest_v2/reports/Re013.pdf" const params = { AMB_OCULTO : "123", AMB : "123", INS : "FF", ORD_INI: "419435", ORD_FIN: "419435" } const file = await axios.get(url, { params: params, responseType: "stream", auth:{ username: "jasperadmin", password: "jasperadmin" } }) res.writeHead(200,{"Content-Type":"application/pdf"}) file.data.pipe(res) } catch (error) { console.log(error) } }) app.listen(4000,()=>{ console.log('') }) any help on this?
  20. First of all, a subreport is also a report, this means that everything you do with a report you can do with a subreport. A subreport is a resource of the main report, this means that on the server, it cannot be treated as a report but as a resource, not to be confused with what was mentioned at the beginning, subreports are also reports but when they are treated individually, when they are embedded within a report so they become content resources. JasperReports Server does not work with jasper files but with jrxml, when the path is absolute like the one mentioned in your example, these are uploaded as jasper (from Jaspersoft Studio), it is not ideal, when the path is relative and points to the server it is mandatory to use the jrxml. You can see the subreports as resources of a report in JasperReports Server by selecting the report that contains the subreport and clicking edit, then select controls and resources and all the resources used by the report, including the subreports, will appear there. You can upload the subreports to the server individually, but they should be as jrxml, this is ideal, since you can then point them to one or several reports, this is useful to avoid uploading the same resource to the server. I hope I've helped. Saludos :D
  21. I don't understand, just as you can call an image you can call the others, what is the problem here?
  22. In my case, I have the subreports in a folder called subreports, so follow the next path "repo:/subreports/report.jrxml" I have placed the address parameter as: <parameter name="DIR_SERVER_SUBREPORTS" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["repo:/subreports/"]]></defaultValueExpression> </parameter> So in the subreport I only have to place the parameter + the report $P{DIR_SERVER_SUBREPORTS} + "subreport.jrxml" Note: Do not use - to separate words, as this is not recognized by jasperserver, use _ instead.
×
×
  • Create New...