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. Jasperstudio is cleary a software application as it is build on eclipse IDE as the base of the application. Jasper Server is a Web application as it need to be deployed on servers like Tomcat, Jboss etc and you gain access via browser. url address
  2. OO tough one. There should be more stack trace, that is ussually just the end stack trace part. Like mt example at end of this message. Anyway, best way would be to maybe view the reports in source mode and us the ctrl - f to find 'java.lang.Number' , you can then review each expression to see if incorrect type used or need to maybe parse string type to number. If anyone has a better suggestion, please share. net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $P{Parameter1} at com.jaspersoft.studio.editor.preview.view.control.ReportController.fillReport(ReportController.java:550) at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$16(ReportController.java:525) at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:420) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $P{Parameter1} at net.sf.jasperreports.engine.fill.JREvaluator.handleEvaluationException(JREvaluator.java:287) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:319) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:672) at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:640) at net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(JRFillElement.java:1164) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:526) at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:510) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:383) at net.sf.jasperreports.engine.fill.JRFillFrame.evaluate(JRFillFrame.java:159) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:383) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:533) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterNewPage(JRVerticalFiller.java:1347) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1168) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:149) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:609) at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.math.BigDecimal at userSessionAuditSA_1520611479605_363437.evaluate1(userSessionAuditSA_1520611479605_363437:738) at userSessionAuditSA_1520611479605_363437.evaluate(userSessionAuditSA_1520611479605_363437:719) at net.sf.jasperreports.engine.fill.JREvaluator.evaluate(JREvaluator.java:305) ... 15 more
  3. Not sure how you want to split and instance. If you need 3 jasper instance you need 3, you can't split. I guess of you have one AWS server envirn, you would need admin access to run 2 additional jasper installs and in each install, update the port numbers. You going to require some DEv/Ops skill to get this done, but possible. If you want to clearly separate dev, test, proc but can only work with 1 instance, due to budget constraints, then I suggest of your using professional, just create multiple organization and have 1 for dev, another for test and another for prod. So all user will access same instance, but content of organization would be different and permission would be different. If you don't have pro, then just create 3 different folders in root directory. 1_Dev, 2_Test, 3_Prod then just copy past the content of one folder into the other main folder. There after you need to go create roles and user that are allowed to access given folder and then assign permission to given group. So logically if you develop in Dev and a new report is update, then recreate report in Test and if all good then recreate in Proc. You going to keep some track of all of this, but saves you a lot of time. Obviously not likely to have Proc in same instance, but I have worked with companies that could only afford doing that. So, Dev was done on local and then the Dev in jasper was only for Done development, so deployment. then test would be next step and then proc.
  4. Hi Naresh. First of all I know how you feel, needing help and no one is answering. When I started my Jaspersoft journey, I made a promise to myself to assist Jasper Dev that started like me with answering question and passing over knowledge in the forums. Ok so you strack trace error is clearly SQL related. So your query is "select * from JSW_LOCATION_MASTER where ID_NO=$P!{CustometID}" First of all you tested the datasource connection your created ? 2nd you assigned the correct data soure the report when deplying to JasperServer. Then are you planning on injecting SQL or building the SQL query as you are using $P! which is used in such case. If you just passing over a normal parameter value then $P{CustometID}, would surfice. I would recommend adding a default correct Customer ID in the parameter expression section, just to test with. Then the CustometID input control data is it gotten from list or another query ? And is that setup correctly. Trouble shoot and test the report apart. First test report with default value, and declaring the input control as single select first. Then if that works more on to improve the import control data fill. Also to help troubleshoot sql queries. In jasperserver as admin, go to manage tab, then under log settings set SQL query executer to debug level and set Input control value queries to debug level. That would at least assist you with the SQL.
  5. You sure the value $P{p_report_date} is being passed over correctly: I notice null in stack trace : java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalArgumentException: The date must not be null at. May test your expression firts via hardcode. When you know that works, then tes that parameter value is being passed over. So just remove this whole epxression and only put $P{p_report_date}. Then drag parameter onto report, run and see if correct date is being displayed. When you have both working then just replay hard code value with $P{p_report_date}. Also insure datatype is correct, you might need to convert date to string, but you get to that later. just get the above 2 items working first.
  6. Could try and make the elements 1 px in size as hidden elements still take up space. And then just select relevant Stretch Type and maybe awell stretch with Overflow. If you still have issue maybe add subreport with given fields to be hidden and hide the subreport in the above mentioned way. So if it is to hide, it only takes up 1px and if not it will strecth and display values. Hope this helps.
  7. So answer would be yes. Keep in mind the different versions of server, might cause an issues. So 2 ways you could do this. 1) Use the repository view in studio to connect to server, then going to specific report.jrxml, double click, make changes and save as new report. 2) Use the export function in the server to export the given report. Unzip the export zip. Look for the file that has reportname.data and open it using any text editor or html browser. Copy the xml. In studio create new report. Select source tab that will show new report xml. Select all and copy over the reportname.data context. Select design and report should update and will the one currently deploy on jasperserver. Sometimes you do get java stack trace errors. Highly likely that JS pro report elements where used and now it's was copied over to a jasperstuiod community edition, thus some elements would cause errors. Just remove the elements causing the issues. At end of day just follow the track trace, if lib missing just add, if custom code scriptlet misssing, then just add, if path or something missing, just edit to ensure basic function etc.
  8. Hi Steffen, I experience same problem. Seems the only place I could find was https://jaspersoft.artifactoryonline.com/jaspersoft/webapp/#/home So bear in mind that latest libraries only seem to go up to 6.3.0 I recently built a small program that works with the jasper java api. At development time, I used the libs found in the jasperserver 6.4.0 and at later stage on build time decided to try find public repositories. I was concerned that jar labeled as 6.3 would not work, but they all compile and not issues with program so far. Also take not the jr-ce-releases sould be for reporting libs and jrs-ce-releases would be for the jasperserver libs. Hope it all helps.
  9. Seems like you going to have add some custom code. Don't think there is a easier way that you going to achieve your desired results. So maybe have a look if the below link might asssit. https://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v55/adding-custom-export-channels or you might need to dump the csv file somewhere and then add the txt ext with some cusotm code.
  10. Band size are limited by 2 things. Page Format : Height i.e. 800 px Total band with margins not to exceed height. So if 7 details band each 100 px that is 700 px Margin i.e. 20 px and header i.e. 50, that only leaves 30 px for footer band. If need 50 px, then increase page format height to 850 px. Not sure of their is anything else preventing you beside mentioned above?
  11. You going to need to make use of some creative thinking. Not sure if you get the actual menu tab expectation. But you could generate the id on the firt page and then add subreports that would generate a given info sheet by irerating the id to the subreport. Then you can add Anchors, Bookmarks to the id, so when users clicks on it, it will jump to the section with info of given id and then just ensure there an Anchors, Bookmarks on each id info sheet back to main page. Or Add Hyperlinks to each id that would open seperate pop up page for each id. So when doing this you would have 1 report that will be displaying the id's only. Then you would have another report which would be ID info sheet. So both reports would be deployed to server, so when user select id on 1st report, then hyperlink would pop up the id info sheet and pass over the given id number a parameters to ensure your datasource return correct data for reports. Might be other ways, but this is off the top of my head. Jasper also allows to code in javascript, so you could play around with that aswell, see if you can add a list elemet with hyperlinks of something like that.
  12. I Guess easiest way would be to make use of the $V{PAGE_NUMBER} varaible to keep track of page number and then in the page footer band use the "Print When Expression" $V{PAGE_NUMBER} == 9 or add a text element and use the elements "Print When Expression" expression.
  13. Hi wszystkielogizajete (lol keyboard smask user name) This is a difficult one to achieve. I am not sure if your produce both long and short text return on report build, so it's hard to try and give you exact answer based on your requirements. If you either get long or short on reports request, you could put the 2 elements on top of eachother and use the "Print When Expression" So create another varable that would indicate of long of short, then add the condition in the "Print When Expression". So if long then the one text field will display if shor the other. Or you could put the 1 cell on top ot the other and have 1 pixel height, then ensure the short data writes to the short cell and long data writes to long cell. Also ensure the strech with overflow is enables and add stretch type (play around with different types). If the cells don't work, try mutiple subreports, one for long data and other for short data. Or you could add additional band and use one band for long data and other for short and use the print when epxression again. Or and end of day programmaticlly the only way would be to make use of the jasper java api, to create jrxml on request and set the height and w​dth at compile time. Just throwing ideas out there, hope it helps. If you come up with another solution please share. ​​​​​​
  14. Have you tried the following ? https://community.jaspersoft.com/wiki/how-enable-text-output-jasperreports-server
  15. You won't be able to just use a jrxml report from ireport to jasperstudio. Libraries, classpath etc are different. You will have to look for if there is an option to convert ireport template to jasperstudio. Otherwise you need to look at the logic in the xml in ireport and copy pieces over to a standard jasperstudio report template. Test if works, if yo uget error, either see if yo ucan remove the given xml tag and test again or you need to see how jasperstudio implement the same elements in xml. Example if the table elements in xml in ireport is similar to the table elments xml in jasperstudio. If not edit the old ireport xml to suit the new jasperstudio xml. (That is if you cannot find convert option) Hope it helps. At least I tried to answer.
  16. Hi rikiti, If you want the selected parameters ($P{Date1} , $P{Date2}) to filter the subreport data as well, then yes you need to pass the parameters. I dont see you using any parameters in the subreport so not sure if this is what you want to achieve. Currently the way you have it setup: Your main report (parent ) what you call father reports runs it's own sql set and return data to be used in the main report or you could pass data to subreports or other reporting elements. Your sub report returns a seperate data set that is ussuable in subreport and not in main. If you want subreports or other elements like charts, crosstab etc to make use of parameter selected by user in main, then you need to pass over the parameters. To do this you need to create same parameters in subreports. So in this case Date1 and Date2, same datatypes, no need to set default expression as when you link with main parameters, the main parameters default values will be passed over. So when selecting your subreport under the properties tab, look for subreport tab, then there is a "Edit Parameter" button. Then select Add button. Parameter Name should be: Date1 Parameter Expression should be : $P{Date1} (You should be able to browse for it when selecting the Expresion editor button) Add Date 2 aswell and finish. To test: Drag date 1 and date 2 as fields in your subreport header/footer or summary band and test to see the value being passed over. Then confirm if working, update your subreport sql to include the $P{Date1} and $P{Date2} parameters. Hope it helped. If it did, please upvote my answers. Thank you
  17. Hi bmservices, Glad you could solve your issues. Could you upvote my answer, pls. Thanks
  18. Hi Rest api can get so frustrating so I could understand how you feel by now. So the 404 could mean a couple of things. Best would be the test your rest call in a program like postman or R client, jasperserver in most cases sends back error response. Examples <errorCode>resource.already.exists</errorCode> or When using your datasource "/Data Sources/Vertikom Datawarehouse PRO" the below error. I notice your datasource name has whitespaces, you need to call the resource id . In jasperserver the resource ID cannot have white spaces. The resource id is not the same as the label, unless your kept it the same onpurpose. If not your resource id name will most likely be Vertikom_Datawarehouse_PRO <errorCode>illegal.parameter.value.error</errorCode> <message>The value "/Data Sources/Vertikom Datawarehouse PRO" for parameter "resourceReference.uri" is invalid.</message> Ok some more feedback. I succesfully completed your rest request by using a PUT and having the following values. (So your json paylod structure seems to be fine.) url : http://localhost:8080/jasperserver/rest_v2/resources/jasperrepopathtoreport/TestReport?createFolders=true&overwrite=true Headers X-REMOTE-DOMAIN : 1 Content-Type : application/repository.reportUnit+json Body : { "label":"mquest_P706_SEG_Rackjobbing", "dataSource" : { "dataSourceReference" : { "uri" : "/path/to/datasources/resourceIofdatasource" } }, "jrxml" : { "jrxmlFile" : { "type":"jrxml", "label": "mquest_P706_SEG_Rackjobbing", "content" : "my own 64 encode report" } } }
  19. Could you give my solution an uptick, would really appreciate it. thxs
  20. Ok so if you deployed to server and report is working on server, you can see the sql being produced by report in the following way. On the server under tab "Manage" , select "Server Settings". Then under the setting sub vertical menu, there is a tab "Log Settings" , this should be your default screen when going to Server Settings. In this tab you will see some log settings. 1st columns is the name of the logger. So look for : - SQL query executer ; - net.sf.jasperreports.engine.query.JRJdbcQueryExecuter ; - Set the tab to debug level, not errror. (no need to restart server) Go run the report in the server again. After running report, go to JasperInstallDirectorywebappsjasperserverWEB-INFlogsjasperserver.log. All sql report uses will be logged to this file. You can enable more logging properties or add more if you need. Did you try all the other steps I recommended ? Also in the summary band in your're report, maybe add the parameters P1, P2 and P3 text elements to confirm that the correct values are being passed over 2nd is the property of the logger. 3rd is the log level.
  21. This is a tricky one, there might be mutiple ways to achieve, but all depends on requirement end result. You report design need to be designed in a way the the column w match. So example if you have 2 header and 2 columns in detailed band and 2 in footer and 1 element in summary band. So header column 1 is 30 px and columns 2 is 70, then columns in detial band need to be same size and exactly incline with the header columns, then same for footer columns. The element in summary band need to be either 30 and exactly set inline under the 1st header column or 70 and set exactly inline under the 2nd header column or set to 100 px that is the sum of header columns 1 and 2 and set inline under the given columns. Same would go for title band if using title, but one can exclude title band when exporting by using excel export properties or when breaking up the report into seperate sheets would also work, but not practial, but I would in most cases remove title on export, then have sheet 1 for header, detail and footer, then split summary on second sheet. Hope it helps and enjoy jasper!
  22. Hi dzoku, sure thing, think I could assist. Back in the day when I started with jasperstudio I just needed someone to explain to me the basic on how the patterns etc all works. So the print when expression is mostly use in boolean instance. So i mostly use variables. example : $V{PAGE_NUMBER} > 1 would be in the print expresion and thus when expression is true it will print. Of you could add and if statement in the print when expression: $V{PAGE_NUMBER} > 1 ? true : false (I am showing this so you know you can use mutiple if statements) So mutiple if would be $V{PAGE_NUMBER} > 1 ? true : $V{PAGE_NUMBER} = 5 ? true : false Another way to work with the detailed band if you do not want the whitespace is the reduce the detailed band to 1 px height. You can still have the element include, also set to 1 px and just add stretch to overflow to true. Not sure if the detailed band is best place to add your image thou, as the detailed band is depended on the number of rows being produced based on your dataset. So if dataset 10 rows and px for detialed band set to 1 px, then the detailed band will produce 10 px in sequence. If you want image rather maybe use a group band that does not increment, just call it a dummy band set group to nothing. Cool, hope it all helps, enjoy jasper !
  23. You question is more SQL query focused. You want to do a query that returns a count based on where condition and then also return specific b record based on where condition. My first recommendation would be to get the query working on a db editor, i.e. SQL developer for oracle, mysql workbench for mysql, heidisql for most of them, you decide which one is best. A double join might not work in this case. Maybe 2 sub queries? Or one join with a subquery in the select statement on the count. There might be numerous way to do this. You could even to 1 query in the main report, which counts all primary flags of b and then add a dataset or sub report that return the results of the other query, then you just pass over the result of the first query to the dataset or subreport. You could just select all data based on first join and then just use variables with expression to give you the results you are looking for. But and end of day it would be best to get all the calculations done on db level, so try to get all you want with your query. If you get it working in db editor, then you can test same query in jasperstudio. If it works in db editor it will work in jasperstudio as well.
  24. Hi this is gone require some work from you to figure out. (are you using html chart correct?) Html charts use highcharts.js library I could not find a working demo example in Highcharts for what you are looking for. Jasper pro uses highcharts.js for rendering their html reports. So, you need to work through the highcharts api and see which properties you can manipulate to get your results. Most of the highchart properties are already included in jasperstudio under chart properties. You might need to add some highchart properties if they are not added as default in the chart element. Highchart api https://api.highcharts.com/highcharts/chart Here you will find properties to be set, explanations and in some cases jsfiddles example to play and test with. If this is your first time working on this, I recommend taking a easy property, manipulate it on a fiddle and then reproduce the result in your jasperstudio by updating the chart elements properties. Then from there on it's just trial and error to get your desired result.
×
×
  • Create New...