Jump to content
Changes to the Jaspersoft community edition download ×

adam_7

Members
  • Posts

    26
  • 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 adam_7

  1. I am having trouble with a divide expression in a report. The report is set to run from Jasperserver automatically every day. 99.99% of the time it runs great. Occassionally the report will error and i just dont think twice and do not investigate. Today i decided to investigate and found this error. __________________________________________________________________________________________________________________ net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{Sum- Discount Amount}.divide($V{Sum - Sale Amount},4)at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:537)at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:512)at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:393)at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{Sum- Discount Amount}.divide($V{Sum - Sale Amount},4)at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:874)at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:172)at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:423)at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:152)at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:536)at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:411)at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:386)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1066)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1025)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:161)at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)at java.lang.Thread.run(Thread.java:745)Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{Sum- Discount Amount}.divide($V{Sum - Sale Amount},4)at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:352)at net.sf.jasperreports.components.table.fill.BuiltinExpressionEvaluatorDecorator.evaluateEstimated(BuiltinExpressionEvaluatorDecorator.java:94)at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:607)at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:208)at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1276)at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1250)at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1056)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:732)at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)... 1 moreCaused by: java.lang.ArithmeticException: / by zeroat java.math.BigDecimal.divideAndRound(BigDecimal.java:4106)at java.math.BigDecimal.divide(BigDecimal.java:5183)at java.math.BigDecimal.divide(BigDecimal.java:1561)at java.math.BigDecimal.divide(BigDecimal.java:1622)at Employee32Discount32Per32Receipt32V2_tableDataset_1467986985409_229125.evaluateEstimated(Employee32Discount32Per32Receipt32V2_tableDataset_1467986985409_229125:431)at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:338)... 15 more __________________________________________________________________________________________________________________ Both variables in tis expression yield numbers that are not 0 so i am not sure why i am getting a / 0 error message. If i remove the scale of 4, i get the following error message. _________________________________________________________________________________________________________________net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{Sum- Discount Amount}.divide($V{Sum - Sale Amount})at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:537)at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:512)at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:393)at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)Caused by: net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{Sum- Discount Amount}.divide($V{Sum - Sale Amount})at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:874)at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport(FillTableSubreport.java:172)at net.sf.jasperreports.components.table.fill.FillTable.prepare(FillTable.java:423)at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare(JRFillComponentElement.java:152)at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:536)at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:411)at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:386)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1066)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1025)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:161)at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFill.run(BaseFillHandle.java:123)at java.lang.Thread.run(Thread.java:745)Caused by: net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: $V{Sum- Discount Amount}.divide($V{Sum - Sale Amount})at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:352)at net.sf.jasperreports.components.table.fill.BuiltinExpressionEvaluatorDecorator.evaluateEstimated(BuiltinExpressionEvaluatorDecorator.java:94)at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:607)at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:208)at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1276)at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1250)at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1056)at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:580)at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396)at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:732)at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59)at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)... 1 moreCaused by: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.at java.math.BigDecimal.divide(BigDecimal.java:1690)at Employee32Discount32Per32Receipt32V2_tableDataset_1467987615796_138525.evaluateEstimated(Employee32Discount32Per32Receipt32V2_tableDataset_1467987615796_138525:431)at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:338)... 15 more _________________________________________________________________________________________________________________ This would indicate that the two numbers being divide simply create a never ending decimal, but i though the scale would have helped that. Any support or help would be appreciated. I am a newbie when it comes to java reports.
  2. Casting as float allowed me to use the * and > expressions.
  3. I get undefined operators when i try to use > or * in the expression. That was my problem when trying to get the expression set up. I think it wants me to use java expressions like this from a different report i have: ($V{Margin}.divide($V{Adjusted Retail})
  4. Hello All, I am not very good when it comes to java and i was hoping someone could help me with some conditional formatting in a report. I have two columns that both contain BigDecimal values. One columns is the averages sales per day (over the past 60 days), and the second column is the total sales over the past 3 days. I would like to create a conditional style that highlights the 3 day sales value if it is over 3 times larger than the average day sales. This is to show a recent influx of sales on a product over the past 3 days compared to the typical average. Here is an exmple of the simple math expressions: if (3 day total) > (60 day average x 3) - highlight green I am pretty sure i can set up the styles how i want, i just dont know how to take the above math expression and actually create a java expression out of it. Any help or advice would be appreciated.
  5. Asimkin Thanks for your response, I have already tried changing the relativedate.properites file with no luck. I found the datepicker file in my optimized scripts folder and changed it manually. SInce that file is already in the optimized folder, is there any need to reoptomize it? Making the changed and restarting the Tomcat server seemed to change it how i wanted.
  6. Hello All, I hvae some reports that contain input controls for the date (mostly sales reports). Everything works smoothly with the reports, but some of the people have made complaints that the date picker calendar displays Monday as the first day of the week, when they are more familiar with Sunday as the start day of the week. Anyt thoughts on where I can change this? Thanks
  7. Your smtp server is "mail.localhost.com"? are you sure your smtp settings are set up correctly?
  8. I would check this file and set the authentication option to true if your SMTP server requires authentication. $TOMCAT/webapps/jasperserver/WEB-INF/applicationContext-report-scheduling.xml and change the following option.. <property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> </props> </property>
  9. I am a newbie myself when it comes to these things, but i do know that the only place you can add Tables is to the Summary band. I believe that charts are the same way.
  10. Does your SMTP server require authentication?
  11. I ended up abandoning the idea of doing the address labels through SQL and started doing them through Postgresql. I created a database funcation that duplicated the item (for the quanity) then refrenced the function inside my dataset query along with the input paramaters. I was successfully able to create a report that would give me XX quantity of a specific label.
  12. Up until now I have just don't basic chart reports. I am now attempting to do a report similar to yours where the IC is passed directly do the main report dataset. I have my input controls named exactly like my parameters but it doesn't seem to be working either. I am receiving a message saying unable to fill report. When I used the multi-select before, I had to use Array as my class
  13. I found some information on using temp tables to generate the data how i want in SQL, but JasperStudio/Jasperserver doesnt appear to like the query. I am assumin its too complex for the report to handle. I decided that maybe it didnt like creating and dropping a temp table so i opted to create a permanent table but have the script truncate the table after run. Here is my final script, it works great in SQL, but doesnt work in JasperStudio/JasperServer DECLARE @copies INT SET @copies = 1 While @Copies <= $P{Number_of_Labels} Begin Insert into LabelQuantity (UPC,UPC_Description) Select UPC,UPC_Description from UPCLIST where UPC = $P{UPC} Set @copies = @copies + 1 End select * from LabelQuantity truncate table LabelQuantity
  14. From Google's support page https://support.google.com/mail/answer/78775?hl=en If you tried configuring your SMTP server on port 465 (with SSL) and port 587 (with TLS), but are still having trouble sending mail, try configuring your SMTP to use port 25 (with SSL). Apple Mail users: At times, Mail may misinterpret your SMTP server settings. If you currently have 'smtp.gmail.com:username@gmail.com' in the 'Outgoing Mail Server:' field of your settings, please try changing the field to 'smtp.gmail.com' and saving your settings. Also, if you are using secure authentication, you need to change the following file: $TOMCAT/webapps/jasperserver/WEB-INF/applicationContext-report-scheduling.xml and change the following option.. <property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> </props> </property>
  15. Hello all, I have seen this question several times in the forum in the past with no answers but decided to post myself in case anything has changed and the old posts were never answered. I would like to print barcode labels through Jasper so that I can generate label information from my database. I have the "template" for my labels all set up and the correct fields entered into my label. I can successfully generate the labels and print them on my sheets but i am having trouble printing more than one of the same label. Example: (using sql database) My report currently has 1 input control that specifices the UPC number that will be on the barcode. Example Query Select UPC,UPC_Description from UPCList where UPC = $V{UPC} The input control works great and generates one label for the item. I would like now print multiple quantity of this same label. The only option i could find for attempting this was to alter my query so that it would do a loop while type of function. This option does generate the data multiple times, but not in the same results tables so that Jasper can see it as the same item multiple times. Bascially the results look like 1. result 1. result 1. result instead of 1.result 2.result 3.result DECLARE @copies INT SET @copies = 1 While @Copies <= $P{Number_of_Labels} Begin Select UPC,UPC_Description from UPCList where UPC = ' $P{UPC} ' Set @copies = @copies + 1 End
  16. Thanks, that fixed the issue. I didn't realize I would have to create a Group Band even though I am not using that band at all within my report.
  17. The variable will not let me select group as I mentioned above. It will only allow me to pick report, column, page, and none as both increment type and incremental reset.
  18. I have a report filled with Sales Data. The data is broken down by department and grouped by department groups. Table Header - Empty Table Column Header - Column Headings (fields Table Group Header - Department Group Number and Name Table Details - Data (per department) Table Group Footer - Department Group Totals Table Column Footer - Empty The data is oranganized and being displayed in the proper locations, but I am unable to get totals for the variables in the Department Group Footer. When i look at the Variable itself, it does not give me the option to increment or reset based on Group. I only have Report, Column, Page, and None. Am I missing something that allows the increment type to be set as group?
  19. I finally figured out the issue. Since I was using a table in my report, I had to create a paramater in the main report that matched my input control on the JasperServer website. I then had to create another paramater in the subquery and include that parameter in my query. Then, under my table element I selected the Paramater tab and linked the two parameters together. Since i was using a multiple Selection Checkbox on my site, I had to set the Paramaters up with the ArrayList class and the Nested Type Class as Integer (since im using numeric values in my input control). It took me forever to figure out all of the little nuiances so if anyone needs help feel free to message me and i will share my information.
  20. In JasperStudio I created my parameter "StoreNumber" and added it to my query. When I try to compile the query, it gives me an error and I am unsure how to set it up as an input control and provide my list of values. If I create the report on the JasperServer site and add the input control, it tells me that the Parameter does not exist. I have double checked the names and they are both exactly the same name and case. Ideally I would like to be able to add the input controls in JasperStudio because the ability to create the reports is much more robust. I just cant figure out how to add the input control correctly and have it prompt
  21. Hello all, I am using Jasperserver 5.5 and JasperSudio 5.5. I have created a report using the Blank Table Based Template in JasperStudio. The report has a heading with a table in the summary band containing all of the information. The report runs great but I would like to add some input controls to the report. The report contains sales data for multiple stores, for multiple days. Right now I have the sales data limited to all stores for one day. Ideally I would like to have multiple controls, but to start off I would just like to get an input control working so that i can pick only a certain store. I have tried multiple combinations of adding parameters and putting them in my query but I cant get anything to work properly. I am wondering if the input control does not apply for the tableset query (the main report does not have a query). There also does not appear to be a good way of adding an input control from the JasperStudio interface. Any tips or advice would be appreciated. I will be more than happy to upload an examples or screenshots if needed.
  22. Sun Java isnt supported under the Ubuntu Repositories, i tried to install it manually using some instructions online but it would crash Tomcat whenever i attempted to run a report. I ended up reinstalling Open JDK 6 since it is supported by JasperServer and switched my JDBC driver to the Microsoft Driver instead of the JTDS Driver.
  23. I am having the same issue as the original poster but this did not correct my issue. I browsed to the install directory and located jaspesoft studio.ini and removed the value for -XX:MaxPermSize. So that line now reads for me "-XX:MaxPermSize=". This allows the program to load but I dont that it is an ideal situation.
  24. Hello All, I recently set up a small test machine (XP Pro) and installed Jasperserver Community Edition to test out functionality. I configured my Data Source (SQL 2008) using the JTDS driver (1.3.1) and everything has been working great. I received approval to purchase some addtional hardware, but due to budget constraints i opted to install on Ubuntu Server instead of purchasing Microsoft Server. I installed Tomcat 7 and PostgreSQL and used the manual WAR installation to set up Jasperserver. Everything seems to be running great as far as the server and the installation of Jasperserver. I am able to log into the JasperServer Web portal without error. I copied the JTDS driver into my jasperserver/WEB-INF/lib folder and rebooted, but when i attempt to set up the Data Source I receive an Error Box that is completely blank. I have attempted to turn on logging for the JDBC driver but so far I have been able to generate any log files. I guess my biggest concern is that maybe the JTDS driver does not work with OpenJDK 6, but i am not 100% if that is the case Any help or insight is appreciated. Adam
  25. I have Windows 7, I just pulled a freshly installed XP machine out of storage so I can test some of the software. Maybe I will purchase the software later, maybe I wont, but I dont plan on spending a $400 a month just to start evaluating a piece of software. Especially when you say that the paid for documentation is full of holes and their new reporting studio is full of bugs.
×
×
  • Create New...