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

joseng62

Members
  • Posts

    196
  • 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 joseng62

  1. Seems that the given class was renamed or the name stipulated in the sample file is incorrect. The "Development" part should be removed in the class name. For Jasper 7.1 use: <bean class="com.jaspersoft.jasperserver.api.common.crypto.DevelopmentPlainTextNonCipher"/> Before Jasper 7.1 use: <bean class="com.jaspersoft.jasperserver.api.common.crypto.PlainTextNonCipher"/> Restart and now you can test plan string through url.
  2. When beginning to test and work on token authentication there is an sample file in jasperreports-server-cp-7.1.0-bin.zip called "sample-applicationContext-externalAuth-preAuth.xml" The first easy obvious step would be to test how all of this works and a none encoded string token would be easiest to make use of to test the whole process. In some example on the internet reference is made in testing via url with un encoded string token. Inside the above file there is a bean that points to a class → <bean class="com.jaspersoft.jasperserver.api.common.crypto.DevelopmentPlainTextNonCipher"/> Still should allow to test token with string as is, but error is occured when following the steps as per example to test this and restarting the JasperServer. Kind Regards Josia
  3. Ok here we go. The REST api call mentioned in documentation is for pro only. So this could be a work around. Do a GET request with jasper url and add flow.html?_flowId=searchFlow to the url. Example http://localhost:8081/jasperserver/flow.html?_flowId=searchFlow Then in the Body you receive back, you need to look for __jrsConfigs__.flowExecutionKey = YOU_NEEd_THIS_VALUE; in the body. Note the value flowExecution key will change from time to time, depending on how long the time lapse it between requests, change in users etc.Next you need to do a POST request. Here is example of POST message : url: http://localhost:8081/jasperserver/flow.html?_flowExecutionKey=THE_ABOVE_Key_Value &_eventId=setActiveTheme Headers: X-REMOTE-DOMAIN : 1 Content-Type : application/x-www-form-urlencoded BODY: (Form) folderUri=/themes/jasper_dark ⌂⌂⌂⌂ I tested the above REST call multiple time, I just updated the folderUri and the execution Key from time to time. All worked and I received a 200 response. Side note for manual testing, another way to get hold of the execution key is via the developer console. After signing into Jasper. Use Console tab and run: __jrsConfigs__.flowExecutionKey this should return the code for you.
  4. Hi Thato You utilizing Community Edition or Pro as the rest request stucture changes. So the manual gives example, but is focused on Jasper Pro and assuming you have already created an org called "Audit" The example is PUT http://localhost:8080/jasperserver-pro/rest_v2/organizations/Audit Payload will have content type : application/json With json payload being : {"theme":"jasper_dark"} But i'll look into and test out how to do this in CE. As "organizations" do not work the same in CE. ;-)
  5. I have not tested this again, but as far as I know , did has not been resolved yet. Technicially should log a bug, but at the time I was not sure how and know i need to test this again first.
  6. I was looking for something or some how to introduce javascript code in the report, which runs when compiled in html. So I did not see this being mentioned anywhere in this thread, maybe the properties was added at later stage. Anaways, if there are future people looking for something like this. These following 2 properties exist : net.sf.jasperreports.export.html.header net.sf.jasperreports.export.html.footer You can add this propertes to the files and in the properties define the script you want to run. Example: • Property name : net.sf.jasperreports.export.html.header • Use as Expression is ticked • Evaluation time is left empty • Expression = "<script>console.log('tester')</script>" So when the report runs, you can use the browser developer tool and view console feedback and you will see the tester print out to console. So script then will work. Now you can then make use of net.sf.jasperreports.export.html.id or class to be assigned to elements in your report and you can make use of these to link actions to etc where required and to be reference in the css files.
  7. The error you are sharing, indicates you are not aware of the log file you can use to pin point ussues. When you get Error in JasperServer, always go check you jasperserver.log file. You will have a more detailed stack trace. You can even enable more logging on jasperserver and set to debug level, if needed. In server as admin, go to Manage, then server settings then log settings, there you can add more loggers and log level. Log file will be located at Apache_installed_pathwebappsjasperserverWEB-INFlogsjasperserver.log So go check error there and get back to us.
  8. Hi Deo, You need to get your server up and running correctly first. You need to give us more information. You have server install on Windows or Linux? Did you use the normal jasper installer or did your use the WAR deploy? Which server are you deploying on? Apache ? Are you using Pro or CE ? If Apache, you need to check the log files. Your_Apache_Pathlogs Look into the catalina log files, You should get some meanigfull errors in here. This is the only way to troubleshoot the server so, either the server is not starting up or not deploying jasperserver. Also sometime the server does run, but jasperserver deployment had issues. So if you cannot reach http://localhost:8082/jasperserver (ussualy the basic url), then no jasperserver deployed or being blocked. Or check if apache is atleast running http://localhost:8082 , you should get apache page if successfully started. Remember to refresh browser, as sometimes it caches the page. But the log files would tell you if server is running or not.
  9. Hi georgia. So in your subreport your need to create a parameter. Lets call it $P{subparam} - So make the change in the subreport.jrxml and then save and then compile to generate/update the subreport.jasper. Then in Main report, select the sub report element. In the properties tab, select tab "Subreport" , then select "Edit Parameters" Then Add The in Parameter name it will be subparam then the parameter expression would be what ever you want to pass from main. Hope this helps. Cheers.
  10. If you want to deploy via Jasper Studio, you need to first create conneciton to your server. So make use of the Repository Explorer, under Server, add your japser server, url, user, password etc. Then after connection succesfully created, you will be able to browser the Jserver repository. So then just right click and add new > report unit, then under the report unit add your resource i.e. new > input control etc. Otherwise you can deploy via jasperserver gui. You can either create the resource to be reused across reports or you can create the resource element i.e. Input control within the report element when you deploy the report. i.e. under the Controls & Resources tab. Hope this helps.
  11. Hi firuzz. 1) Maybe try to up the ram allocation. -Xms2048m -Xmx4096m And technically you do not require the heap memory declaration as java 8 does not use that. At end I add my ini file. 2) Maybe link a jvisualvm to it and have a look at how memory is being utilized. In your jaspersoft studio ini add following. -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=9991 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false Update the above values as your required. The jvisualvm would be avaiable in your java sdk bin directory. Called "jvisualvm.exe", it should pick up your jasperstudio if it is running already. So this can give you an idea of the cpu and memory. 3) Sometimes there are element in the report that cause null errors and if this occurs, it ussually slows down the js and then requires a restart. 4) Try to run js.exe in administrator mode. ini file -startup plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740 -data @noDefault --launcher.defaultAction openFile -vm C:/Program Files/Java/jdk1.8.0_144/bin -vmargs -Xms2048m -Xmx4096m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=9991 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
  12. Hi firuzzz, Are yo usure you have sharing the correct error ? The method parse(String) in the type DateFormat is not applicable for the arguments (BigDecimal) value = new SimpleDateFormat("MMM").format(new SimpleDateFormat("yyyyMM").parse(((java.math.BigDecimal)field_periodo.getOldValue()))); The above expression has a value "MMM" and I cannot find this in the source code you shared ... Also this error indicates that periodo was set as bigdecimal type and your source code has periodo set a integer type, which will no generate the error above ? So something is not matching with your error and the source code. Are you refering to date in your title subreport ? Also in your detialed band you have 2 textfield where you make use the 2 expressions : • $F{total}.multiply(BigDecimal.valueOf(0.09)).setScale(2, RoundingMode.HALF_UP) • $F{total}.multiply(BigDecimal.valueOf(0.09)).multiply(BigDecimal.valueOf(0.85)).setScale(2, RoundingMode.HALF_UP) Rather create variable to do this. Set class to java.math.BigDecimal , Calculation to no calc , Expression to your expression. Initial Value Exp to new BigDecimal(0) Increment Type to None , Reset Type to Report. Then use the variable in your textfield in the detial band instead of the whole epxresison.
  13. Hi Michael, seem you need some guidance on this one. So I am assuming your will get the groups from the sql. So first of all create a group and in the group epxression create the logic for the grouping there. So example of you have a $F{group} from sql then just use that fields or maybe some if logic. $P{group}.contains("GroupA") ? A : $P{group}.contains("GroupB") ? B : $P{group}.contains("GroupC") ? C : "" Then you make use of the group header band or footer band and add your subreport there. (Just a note, you mentioned using a table, so if the case , just use the table element instead of subreport.) Ok so know you need to pass over a parameter from main report to subreport or table element. So if subreport, then click on the subreport element, in the property tab, select "subreport", then you see a "Edit Parameter". This is where you link any main parameter, field or variable with your subreport parameters. You need to create a parameter in your subreport. Remeber to update your subreport jrxml then safe, then compile to create/update the .jasper file. if table, then you will make use of a dataset, so create the parameter in the dataset. Then same logic above, click on table element in properties tab, select "Dataset", then "Parameters" Other option is that you could make use of 3 table or 3 subreport and just use the print when expression, but do not add this in the detialed band as you will get a lot of subreport/tables generating based on you main report row count. So if your data returns 3 rows in main report and you have 3 tables/subreport in your main detailed band, you will generate 9 table or subreports. This is ok if it is what you want to achieve, but can create a out of memory and loop issues when you main and subreport returns a lot of row possibilites. Hope all of this helps. Kind Regards joseng
  14. Hi kazun..... There could be a couple of reasons for this. • Some of your subreport might not be getting any data, to test, make sure you set the report's proprerty "When No Data Type" = All Sections with Detail, ensure you have some hard code text fields in the subreports, so you can just test if this the case. • So when you work on the subreport jrxml and you safe, remember to compile in jasperstudio so the .jasper is updated. • Also I did not ask, but I am assuming that you are getting the issues in jasperstudio and have not yet deployed to JaserServer, as with jasperserver you need to make some setup before they will work. • Could be the last page Footer causing this. So either use in Summary or create a dummmyGroup and make use of dummyGroup Header or Footer Section. Hope this helps
  15. tgmothers I feel for you sir - like I said, I had same redirect issues and it was so frustrating. So regarding error Error UID: ee79d77b-2a8d-4bb3-90ea-d91c76413e50 does anybody have any ideas? There error canot be itereprted as is, you will need to look into the log file. Also maybe try to change to port no • YOUR_APAPCHE_PATH/logs - catalina *.log, there others here migh also be of some use to you. • YOUR_APAPCHE_PATH/webapps/jasperserver/WEB-INF/logs - jasperserver.log You will have a more useable stack trace issue. Also maybe try and update the port no. • YOUR_APAPCHE_PATH/conf/server.xml (update 8080 to 8082 or anyother open port.) <Connector port="8082" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> Let me know if you got this sorted/
  16. Did you cutomized the the server config to redirect http to https ? I can remember I had similiar issues with this when I had to redirect from http to https. Could not get it resloved. I had to add a landing page for the http request that had a link to the https. If not. Make sure in the browser that your are using that you try not connect to mutiple jasper instance. There is a Jsession cookie that is kept for jasper and this could cause issues. Rather open a tab incognito mode and try to access the jasper instance or use another browser, edge or firefox for each jasper instance you want to connect too, or you can clear your browser cookier history, but i do not like doing that.
  17. I noticed your other 2 subreports Position Type is set to "Fix Relative to Top" Set all three to "Float", should solve your problem. So when you select the sub report, in the properties windows, select "Appearance" tab, then under location > position Type.
  18. So in the subreport you need to create a parameter that is going to hold the value passed over from the main account. So if Account filed in main is integer, then create corresponding parameter. Let say AccountSubRpt. In main report select sub report, then in property tab, select Subreport tab, then there will be a "Edit Parameter" button, use that. So in parameter name type in AccountSubRpt. and then in the parameter Expression select your Account field. So this creates mapping link between the main and sub. This will pass over the parameter. You need to do a couple of other things. 1) Do not add the sub report in the detialed band. its going to duplicate the report subreport mutiple times. Rather create a dummy group, leaving the expression for the group blank, then you can add the sub report in the dummygroupheader section. 2) You need to add $P{AccountSubRpt} to your sub report sql query. That sohuld be it.
  19. 500 is not a null reponse, it is a Internal Server Error reponse. Is your server running without any issues. Maybe check the jasperserver logs and the tomcat logs. Lol in the html reponse you have this below, might be the reason for the internal server error. // dirty hack to get path to current theme Also maybe try some and test other rest calls besides a report call, to identify if it is a general server issues or specfic to a given area or request. Try GET http://<host>:<port>/jasperserver[-pro]/rest_v2/serverInfo - If you still get issue with this one, you definetly have a server issues. Maybe to a rest login request there after. Then maybe just do repo folder request. Then a report request to see that is working. Th other thing is when you do the pdf export request, maybe share your rest call requets, obviously replace the sensative info for dummy into. You could also enable more logging on your jasperserver , i.e. rest calls on debug mode, so you could see each request made etc.
  20. Did you try to place the elements on top of eachother and just use the print when option in the element. So each image would have its own print when expression. Should work, I just created a dummy report with 2 image element on top of eachother, with print when epxression and it worked.
  21. So when exactly is this happening and where ? When creating inputcontrol or after creating inputcontrol, then linking to report, then when running the report ? Then are you doing this via JasperServer Gui or via Jasper Studio via repositorty explorer ? So I took the above code, as is and copied into my JasperServer 6.4.0 queryBeans.xml file, restarted my server and then created an single select query input control with not issues. (You would think it would not have worked as you are using version 5.5.0) Which leads me to think you might have another code issues somewhere else. Maybe look though the Apache tomcat logs to see if some beans are not being uploaded on startup etc. Look at any files that you or someone else might have edited, there could be a simple coding validation issues or error that is a cascading cause of this one. Maybe you have permission issues on your files where the jasperserver is installed. Maybe a files chmod or chown or something was changed by accident. Could be that there is something in the query that is not being validated that should have generated a more specific error and this error is just a cause if that lack of validations? Did you try to reproduce the same input controls on another jasper instance? Did you get the same results? Good luck on this one, I am sure your find it after eliminating possible causes, one by one.
  22. Try this to remove blank spaces : net.sf.jasperreports.export.html.remove.emtpy.space.between.rows = true For pagination, set ignore pagination to true in report, then handel pdf and excel to paginated, use page breaks. Set another property net.sf.jasperreports.page.break.no.pagination = apply For exel you can set propery on the page break: net.sf.jasperreports.export.xlsx.break.after.row = true For pdf you can set pagination with follow property on report level com.jaspersoft.jrs.export.pdf.paginated = true Hope this helps, I could het the result with above combination, where html does not paginated, but xlsx does and pdf does as well.
  23. Ok solution and outcome depends on what your want to achive at the end of the day. So if you want your database to return 1 row with min and max then you can make use of sub queries in your select statement. You did not mention which DB you are using. So example in Oracle: select ( select MAX(number_column) from Your_table ) as MaxNo, ( select MIN(number_column)from Your_table ) as MinNo From Your_table where Rownum < 2 This would return 1 row with MaxNo column with max value and MinNo with min value. You could use ORDER BY age without max function and the first row would be your max and last your min, almost as you did above, just without max function and group by. Or if you want jasper to do this, you need to understand that each row returned from DB will be iterated through. So 3 variables. I created a report below that connect to oracle datasource and use Dual to stump data. You need to update the datasource to your DB or update sql if using another DB. <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1 --> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report name" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="af88d3eb-c1fe-4d76-9a0c-e7394dc2ddb4"> <property name="ireport.zoom" value="3.4522712143931042"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="UPDATE_HERE"/> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <style name="style1" isPdfEmbedded="true"/> <queryString> <![CDATA[select * FROM (select 10 as age , 'Green' as Name from DUAL union select 15 as age , 'Red' as Name from DUAL union select 25 as age , 'Yellow' as Name from DUAL union select 2 as age , 'Blue' as Name from DUAL )]]> </queryString> <field name="AGE" class="java.lang.Integer"/> <field name="NAME" class="java.lang.String"/> <variable name="Max" class="java.lang.Integer" calculation="Highest"> <variableExpression><![CDATA[$V{Variable_2} > $F{AGE} ? $V{Variable_2} : $F{AGE}]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <variable name="Min" class="java.lang.Integer" calculation="Lowest"> <variableExpression><![CDATA[$V{Variable_2} > $F{AGE} ? $V{Variable_2} : $F{AGE}]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <variable name="Variable_2" class="java.lang.Integer" calculation="Highest"> <variableExpression><![CDATA[$V{Variable_2}]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <background> <band splitType="Stretch"/> </background> <detail> <band height="50"> <textField> <reportElement x="190" y="10" width="100" height="30" uuid="9a16ad60-3e8b-415a-b0b7-3b024797f48e"/> <textFieldExpression><![CDATA[$V{Max}]]></textFieldExpression> </textField> <textField> <reportElement x="450" y="10" width="100" height="30" uuid="8949c50d-a9db-4f93-b5c3-0a4503acfd37"/> <textFieldExpression><![CDATA[$V{Variable_2}]]></textFieldExpression> </textField> <textField> <reportElement x="320" y="10" width="100" height="30" uuid="224af22d-cb1a-4922-9d27-6c62bbaf7478"/> <textFieldExpression><![CDATA[$V{Min}]]></textFieldExpression> </textField> <textField> <reportElement x="10" y="10" width="100" height="30" uuid="41a78580-9280-4134-ad54-7cbb69a906e5"/> <textFieldExpression><![CDATA[$F{AGE}]]></textFieldExpression> </textField> </band> </detail> <summary> <band height="100" splitType="Stretch"/> </summary> </jasperReport>
  24. Tough one, cause the log file would be the most accurate and easiest way to asssit you with your issues. Your filling error could be cause by a bunch of possible issues. Common issues Your Sql query you are running on JStudio could be correct against the datasource you setup in JStudio, but JServer datasource could not be same one and thus maybe have a difference in the schema etc. There could be a Resource or inputControl is either not linked or incorrectly reference on JServer to the given report. You could have a inputcontrol where null is passed to subreport and not handled correctly. etc. Then there are a lot of other possible reasons. If your using Saas, some one should have access to the given box, either via the Saas GUI or accessing the actual box. Otherwise you should setup your own local jasperserver with and deploy/test local to iron out any JServer report deployment issues. Log path file, if you maybe need to ask someone to get it for you, would be JasperInstallPathApacheInstalledwebappsjasperserverWEB-INFlogsjasperserver.log
  25. I do not know of a cmd function methods that would do this for you. What you could do is make use of the jasper server api and make a url call via cmd line. You can run scripts that do this. So either you direct report request via https://community.jaspersoft.com/documentation/jasperreports-server-web-services-guide/v56/v2reportexecutions-service Or you can create a schedule job on server of via rest api call, that outputs pdf etc. or emails the reports if you wish and then just call the job to run immeditaly via rest call, via cmd line. https://community.jaspersoft.com/documentation/jasperreports-server-web-services-guide/v56/v2jobs-service That what I would have done. You could write your own small program that you can deploy on your os and just call it via cmd line and pass parameters that would be used to make a url call with method and payload(where required) I would have implemented, 1 of the 2 above, if limited to cmd line request.
×
×
  • Create New...