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

danielsl9.dp

Members
  • Posts

    19
  • Joined

  • Last visited

danielsl9.dp's Achievements

  1. Hi Gustavo, I saw what you say, and what I did is to select that parameter and define those values. Now I can see it under that Tab. But my goal is that the report use by default those values (all) withouth selecting manually, like a normal in clause ( WHERE STATUS IN(5000,5022,5036) .. )
  2. I'm having problems with some reports that use the IN clause in their query. For that I had to use $ X and define a list of values within a field as follows: <parameter name="instatus" class="java.util.ArrayList"><br> <defaultValueExpression><![CDATA[Arrays.asList(new Integer[] {5000,5022, 5036})]]></defaultValueExpression><br> </parameter>[/code]EDIT: Don't know how to delete that block lol, had to put it here -------------------------------------------------- XML -------------------------------------------------- <parameter name="instatus" class="java.util.ArrayList"> <defaultValueExpression><![CDATA[Arrays.asList(new Integer[] {5000,5022, 5036})]]></defaultValueExpression> </parameter> -------------------------------------------------- XML -------------------------------------------------- The report works perfect within Jasper Studio, but at the moment of publishing it to the server and executing it, I notice that the values are not loading. Jasper Studio: Jasper Report Server: Can anyone help me please.
  3. Ok, this is definitely a rookie mistake to think that with the same user, if I logged in later from another servlet and tried to download the file it could work (although it is a possibility, it is not so far fetched). What I did at the end (mentioned in the documentation) is keep that session alive through cookies, up to the point where the javascript file asks for the report every X seconds. This is the only way
  4. Hi, The other day in this forum I asked if with Jasper I can call reports with POST. This documentation helps me alot and now I had a doubt. I'm very interested in call the reports asynchronously. So I did a small JSP Client for request Jasper Reports and download it. The general idea is: 1. Request a Jasper Resource. 2. Get the requestId and wait for the report to load completely. 3. Once the report is loaded, request the webservice for export the resource and download it. What I did: 1. In the first servlet, I recieve the Jasper Resource Path, the parameters and the user credentials. 2. Do a webservice call for get a Jasper Session in order to request the request (/jasperserver/rest_v2/login). 3. When I have the session, perform a webservice call for request the resource (/jasperserver/rest_v2/reportExecutions). This is what I got as content: { "status": "execution", "requestId": "b7aa15a5-5088-4fff-be9a-7f512c4b63cc", "reportURI": "/Reports/Sample_Report", "exports": [{ "status": "queued", "id": "0e4ff01a-b1c7-4f83-ab3b-807c018edb27" } ] } I'm interested in the properties requestId and id, so, I convert the JSON output and extract these properties to be used later. 4. I redirect to the second servlet, where another JSP loads. This page will have a loading screen, and a javascript with a Timer. 5. This timer executes a javascript method every amount of seconds. The javascript method contains a GET request. 6. When the GET request that are inside of the Javascript method is executed, a third servlet perform again the authentication for get a jasper session, and ask if the following resource (b7aa15a5-5088-4fff-be9a-7f512c4b63cc) it's okay. (/rest_v2/reportExecutions/requestID/status/) The problem occurs here. When I ask for the resource, the REST webservice returns 404 as response. . . I wan't to understand how works the requestId here... the value is valid only in the same session?? If I login later and request for this, the output is lost? I did a single call of every step (without redirecting to the waiting page), and I was able to download the file ..... so please, if I'm using the wrong services for achieve this, correct me please.
  5. I don't want to send the report parameters in the browser URL like this: /jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FPublished&reportUnit=%2FPublished%2FUser_Report&decorate=no&standAlone=true I'm very interested to do POST requests and display it in the same jasper server report viewer as always. Is this posible ?
  6. Did the following just for testing: 1. Created a dummy application with an iFrame that acts like a "visualizer" that runs inside the same domain where the Jasper Report Server is executed. 2. Deployed the war file of the dummy application in tomcat like Jasper (same local server). 3. When I call the dummy application directly in my browser... I can visualize the report perfectly. 4. When I call the dummy application from the other one that are inside of a separate domain, I got the following error message: Blocked autofocusing on a <input> element in a cross-origin subframe. Did the same test in my local machine. I changed the domain name of the web application from localhost to my private IP address and keep the same localhost for the Jasper Report Server. Started the webapplication and tried to call the jasper server from the iFrame... got the same results (the infinite calls). So the answer to avoid this problem is to run the webapplication and the Jasper server inside the same domain.
  7. Hello, Got installed Jasper Report in a virtual machine (hosted in AWS with CentOS 7) and I'm trying now to access a report using the URL, like this: http://x.x.x.x:<PORT>/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=<PARENT>&reportUnit=<REPORT UNIT>&standAlone=false&j_username=<USERNAME>&j_password=<PASSWORD>&decorate=no The web application that accesses the reports is also hosted on a separate VM (both are part of a virtual private network). I can successfully access the report using the public IP in my browser (my Machine), but if the web application tries to access the resource, the iFrame keeps loading indefinitely. Also if I check the access logs located in /usr/share/tomcat/logs/ I have something like this .... It's seems like the request falls inside of a infinite loop... why, not sure why. In other question I saw that Infinite loops can be caused by a report design issue, but this is not the case since this was tested before in my local environment (I mean, is the same XML / Template file published in a different Jasper Server Report. It cannot be the issue.) Can someone advice me please. QUESTION UPDATE I did some tests to discard if the fault was at server side or application side: This was done in the web application that are hosted in AWS 1. I can access from the webapplication iFrame to the Jasperlogin webpage using the Public IP Address (cool), but if I try to login to access the repository, the website redirects again to the login page (suspicious). 2. From the web application iFrame, I switched to my local jasper report server and tried to login (Same behaviour like the previous step). 3. Tried to access to a report from my local jasper report server, and it's happening again... if I see the access logs of my local tomcat server I got infinite GET calls too. This was done in the web application that are hosted locally in my machine (with also Jasper Report Server hosted in my local machine too) 1. I can access from the webapplication iFrame to the Jasperlogin page, and also can navigate through the report server. 2. If I put the Jasperreport Server URL that are hosted in AWS to be executed in the iFrame, the problems starts. I can see in the access logs the multiple GET calls again. 3. Tried to access to a report from my local jasper report server, and works perfect. So what are the conclusions? I have a feeling that this behavior could be something related to security. It reminds me a lot of CORS policies when you restrict access to domains to consume a REST service. I feel that the Jasper server detects in the second case, that the service or resource that is calling it belongs to the same local domain, so it does absolutely nothing and loads everything well. The question is, where would the file exist to configure these policies if they exist ??? How is Jasper doing to detect that the call is coming from a domain other than the local one and how can I control that?
  8. So basically, the path for overcome this problem (this case) was: 1. Update the keystore.init.properties in both locations (the one that are inside of buildomatic and the other one inside of WEB-INF) and set the ks and ksp path to /var/lib/tomcat (this can vary dependending of the user name that your system uses for tomcat). 2. Move the two ,jrsks files to /var/lib/tomcat from root folder (if you have it in a different folder like me, move those files from that folder and save it in /var/lib/tomcat). 3. Grant permissions to both files for root and tomcat (chown root:tomcat filename). 4. Restart tomcat. You may keep having issues after following these steps (Keystore was tampered with or password was incorrect for example), if this is the case, then go to buildomatic folder and execute the js-install.sh script for re-generate the pair of keys again. This time you will not have to move any key because in the previous steps you modified the keystore.init.properties. What you will still have to do grant permissions again to the new pair of keys like before. Hope you find this helpful for the community.
  9. For some reason, your trick works like a charm, now I'm able to deploy the jasper application in tomcat ! However, unfortunately got another problem when I try to reach the login page (Servlet.service () for servlet [jsp] threw exception java.lang.NullPointerException at com.jaspersoft.jasperserver.war.themes.MTThemeResolver.resolveThemeName ) but this is another issue, and at least I have gotten the advance Thank you so much for your help Gustavo, you helped me a lot /sites/all/libraries/ckeditor/plugins/smiley/images/teeth_smile.png
  10. Can anyone from the staff help me please. I'm seriously stuck and I don't know how to solve.
  11. Yea is that path, sorry I wrote that part of the exception wrong. Already corrected it
  12. I executed ls -la to my keys folder and I saw this: -rw-r----- 1 root root 6117 Sep 1 18:40 .jrsks -rw-r----- 1 root root 0 Sep 1 18:40 .jrsksp Executed the following command chown tomcat:dphillips /home/dphillips/keys/.jrsks chown tomcat:dphillips /home/dphillips/keys/.jrsksp Now if I run ls -la again -rw-r----- 1 tomcat dphillips 6117 Sep 1 18:40 .jrsks -rw-r----- 1 tomcat dphillips 0 Sep 1 18:40 .jrsksp Restarted the tomcat server but I'm still unable to access, I'm getting same exception
  13. I check your comments, and after read it, I'm almost sure that I done everything well... Now if I re-generate the Keystore files, it is created in /home/dphillips/keys... maybe the tomcat application can't reach that Path ???? It's weird because it's a directory suggested by TIBCO
  14. I'm installing Jasperreport Server 7.8.0 in a Oracle Virtual Machine with CentOS 7. I'm not using the bundle, I'm installing everything separate (Tomcat, PostgreSQL... and Jasper). I already installed Tomcat and PostgreSQL, but now is the time of Jasperreport Application and Oh man, I got A BUNCH of problems. Saddly the documentation and the Wiki of this page is not helping much, regarding the issue of the Keystore files. First of all, the Keystore was saved in the root folder. According to this page: https://community.jaspersoft.com/wiki/how-move-tibco-jasperreports-server-750-encryption-keystore-files-shared-linux-folder I had to made a copy of .jrsks and .jrsksp files and move it to another place (acording to this page) : Okay, cool, I moved this files to /home/dphillips/keys and updated the keystore.init.properties inside of the WEB-INF of the jasper web aplication and Buildomatic (just in case). The webpage said something about a property that honestly I didn't see inside of the .jrsksp file. We are talking about ksPath.. . I didn't added any change here, maybe this part is outdated. Ok, with these change, the Jasperreport application should work, but now I'm facing another issue: I don't know what to do here, and I need serious help, cause yesterday I didn't sleep well because of this. I tried to execute js-install script to regenerate a new fresh pair of keys (in the specified path this time, no moves) and the problem persist. I don't think that this is a file access issues because in the path where is located is supposed to be accessible (according to the documentation itself). Can someone give me a hand with this ???????
  15. Let me explain. I'm trying to connect my application to Jasper's reporting server. I have only one report for now, because I'm still testing. I'm working on it together with Jaspersoft Studio. So far the way of creating reports with Jasper has seemed super pleasant, and the feature that comes with the REST API to integrate the jasper viewer with my application is great. Right now I would like you to help me with something strange that is happening to me: I'm trying to create a dynamic report, with the simple condition that if the user does not send any information in any field of the filter, the query should display everything for that column. This is what I have so far: SELECT .... COLUMNSFROM .... TABLE WITH JOINSWHERE P."CR_NUMBER" LIKE '%$P!{crNumber}%' AND P."NAME" LIKE '%$P!{partyName}%' AND D."PROV_DEC_REF_NUMBER" LIKE '%$P!{provRef}%' AND D."DEC_REF_NUMBER" LIKE '%$P!{reference}%' AND D."VERSION_RECT" LIKE '%P!{version}%'[/code]When I run the report with some information in any parameter (crNumber for example) calling it from the url ( http://localhost:8080/jasperserver/flow.html_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FPublished_Reports&reportUnit=%2FPublished_Reports%2FDeclaraciones_Enviadas&j_username=cfzuser&j_password=cfzuser&crNumber=PA212 ) I expect to have a query like this: SELECT .... COLUMNSFROM .... TABLE WITH JOINSWHERE P."CR_NUMBER" LIKE '%PA212%' AND P."NAME" LIKE '%%' AND D."PROV_DEC_REF_NUMBER" LIKE '%%' AND D."DEC_REF_NUMBER" LIKE '%%' AND D."VERSION_RECT" LIKE '%%'[/code]This is how I have the defaultValueExpression for this parameter: <parameter name="crNumber" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{crNumber} == null || $P{crNumber}.isEmpty() ? "" : $P{crNumber}]]></defaultValueExpression> </parameter>[/code]Now when I call the Jasper Report Server URL and the viewer is displayed, the report is simply not taking the values that you pass in the URL (or is it ignoring it?) Previously, the query had it structured differently. Everything was being done with an additional parameter that stored all the where conditions. I think that previously it was a bit difficult for me to control this parameter since there are quite a few where conditions, so I decide to change it. As I had before it works but for some unknown reason, it stopped working at times. Every time when I checked the logs, the error it threw was "Invalid relational operator" (another reason why I decided to change how I prepared it dynamically). Any suggestion about how I can overcome this problem? P. D. : The report is working great when I preview it in Jasper Studio.
×
×
  • Create New...