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

DawnW

Members
  • Posts

    21
  • Joined

  • Last visited

DawnW's Achievements

Explorer

Explorer (4/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

1

Reputation

  1. Hello, I am using Jaspersoft Studio 6.12.2. I am using the expression editor and need to compare a portion of a string that contains a number to a value. My error is in yhe first part of the statement I believe. my code is: Integer.valueOf($F{(expression)}.substring(0, 4)) < 1999 ? Arrays.asList("AP", "CA", "CC", "CP", "DR","GA","MH", "SC").contains($F{COLUMN_2}) ? "1OLDCIVIL" : "2OLDCRMNL" : "3NEWFILES" $F{(expression) is a string that I need to substring and get an example like 2020. Please help. I am still a newbie. Thx Dawn
  2. DATEFORMAT(NOW( ),"MM/dd/yyyy").setday(DATEFORMAT( org.apache.commons.lang3.time.DateUtils.addDays(new java.util.Date(),1) ,"MM/dd/yyyy”)) This -> org.apache.commons.lang3.time.DateUtils.addDays(new java.util.Date(),1) adds one day to the current date (equivalent of NOW()) using one of our imported libraries.
  3. did you ever get your answer? I am looking to do something similar.
  4. Hello, I am using Jaspersoft Studio 6.12.2. I have a variable of class java.sql.date. In the expression editor for that variable, I need to add one day to the current date. I find a lot of information in posts but none of it works! Can someone please help with the proper syntax? Please don't refer me to a link because I've probably already been there. Thank you in advance for your help! Dawn
  5. Good Day!! I am looking for help with syntax. I am using Jaspersoft Studio 6.11. I am converting a report from crystal reports to Jaspersoft Studio. I have found many nested if statements but non that follow this format. Please help and Thx in advance. CR code: if {bnch_wrnt_law205.expression:37} = "LAW743p" then if IsNull ({bnch_wrnt_law205.expression:24}) or {bnch_wrnt_law205.expression:24} = '' or {bnch_wrnt_law205.expression:24} = " " then " " else if IsNull ({bnch_wrnt_law205.expression:25}) or {bnch_wrnt_law205.expression:25} = '' or {bnch_wrnt_law205.expression:25} = " " then " " else {bnch_wrnt_law205.expression:26} + " " + {bnch_wrnt_law205.expression:27} + " " + {@Zipcode} else " "; I need to follow that format with Jaspersoft studio. Thanks
  6. var1 ? ((var2 ? "result2" : "result1")) : ( (var3 ? ((var4 ? "result4" : "result3")) : (default))
  7. Hello, I am still a newbie to Jaspersoft studio. I am on Jaspersoft Studio 6.11.0. I am trying to write a nested if statement in the expression editor. I did find many examples but none that followed this format. If statement 1 then if statement 2 then result 2 else ?2 else if statement 3 then if statement4 then result 4 else ?4 else default I have many statements that need to follow this format. I appreciate any help you can offer. Thank you, Dawn
  8. Hello, I am on Jaspersoft studio 6.11. I have created multiple reports and added them to a report book. In the individual report, I have added an image(signature) and report compiles and previews fine. When I run it in the report book I get an error "Byte data not sount at repo:/images/signatures/person_name. I have added the signature using Select a resource from JasperReports Server. The image does exist on the server. It displays ok in the individual report but not thru report books. Any help would be appreciated. Thank you, Dawn
  9. RE: https://community.jaspersoft.com/questions/997631/classcastexception-javalangstring-cannot-be-cast-javalangboolean I am facing the same error java.lang.String cannot be cast to java.lang.Boolean I removed all the code in my variables and still get the error. I am attaching my source code. Any help would be appreciated. thx
  10. Thank you Leo, I am still confused because I am working in Jaspersoft studio expression editor. How do I deal with the MathContent there?
  11. Hello, I am new to Jaspersoft Studio. I have a variable that is big decimal called $V{cs_bal}. I need to perform several calculations to get the result. All variables and column amounts are big decimal. In common terms: if column 8 > 0 then var(amt_due) + var(pdl_amt) - column 8 else var(amt_due) + var(pdl_amt) + column8 + abs(column 8) The crystal report syntax is: if {acs_out_bal.expression:8} > 0 then {#amt_due} + {#pdl_amt} - {acs_out_bal.expression:8} else {#amt_due} + {#pdl_amt} + {acs_out_bal.expression:8} + Abs ({acs_out_bal.expression:8}); My expression editor I entered: $F{COLUMN_8}.intValue() > 0 ? SUM($V{amt_due},$V{pdl_amt}).subtract($F{COLUMN_8}) : SUM($V{amt_due},$V{pdl_amt},$F{COLUMN_8},ABS($F{COLUMN_8})) I am getting error the method subtract big decimal is undefined for the type number. Thanks in advance for your help, Dawn
  12. Hello Leo, Thank you for your response. I tried the code you listed and received an error when previewing. "The method strim() is undefined for the type of string". I removed the strim() and used one of our custom funstions trim_null (trims both right and left) and it seems to be working. Thank you for your response!! Dawn
×
×
  • Create New...