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

phantastes

Members
  • Posts

    107
  • 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 phantastes

  1. Hi, Yes you can a string such as '1000','1001','1002' by just adding the single quotes to the exrpession below. I've added it to the code. The expression adds the field value to the variable if the variable is not null. It also adds a comma before (and now a single quote before and after) the field. There is some extra checks to handle the first field being added to the variable (by not adding a comma before the first value). I'm also adding the trim() method to make sure there is no blank space at the end of the string. I hope that helps! Magnus Code:"".equalsIgnoreCase($V{City_List}) ?$F{city} == null ? $V{City_List}:$V{City_List}+"'"+$F{city}.trim()+"'":$F{city} == null ? $V{City_List}:$V{City_List}.contains($F{city}.trim()) ? $V{City_List} : $V{City_List}+",'"+$F{city}.trim()"'"
  2. Hi, does anyone know if there is an easy way to add entire queries to Parameters? I am trying to avoid having the entire query on one line or having to concatenate strings for each line. I know you can use three quots in Groovy to acheive this but the expression editor does not seem to like this. Any suggestions? Thank you! Magnus
  3. Hi, I'm not sure if this is what you are asking for but you could try to add the values to a variable. And then pass that variable to the subreport. This can be done by grouping the report (by country in my example): Country City England London England Cambridge England Oxford Country Footer $V{City_List} The Contry_List variable would be populated like this: Variable Class: String Calculation: Nothing Reset Type: Group Reset Group: Country Increment Type: None Variable Expression: see code below Initial Value Expression: "" (Make sure to set this to an empty String!) Code:"".equalsIgnoreCase($V{City_List}) ?$F{city} == null ? $V{City_List}:$V{City_List}+""+$F{city}.trim():$F{city} == null ? $V{City_List}:$V{City_List}.contains($F{city}.trim()) ? $V{City_List} : $V{City_List}+", "+$F{city}.trim()
  4. If iReport is running too slow you can assign it more java heap space memory in iReportRoot\etc\ireport(pro).conf. See the line that says something like this: default_options="-J-Xms32m -J-Xmx256m -J-Dfile.encoding=UTF-8 -J-Dorg.netbeans.ProxyClassLoader.level=1000" Try something like this instead: default_options="-J-Xms256m -J-Xmx1024m -J-Dfile.encoding=UTF-8 -J-Dorg.netbeans.ProxyClassLoader.level=1000" A restart of iReport is also worth a try. Magnus
  5. Thanks Matt! You guys are really good at listening to feedback! Impressive. Magnus
  6. Hi, 1. As far as I know there is no such property yet. This list contains the id property but not a class property: http://jasperreports.sourceforge.net/config.reference.html 2. I guess there is some kind of workaround by assigning the first part of the ID as static string: "useThisAsAClass"+$F{uniqueID} And then use the static string part as a class. This is far from optimal though and it would certainly be nice with a class property. Magnus Post Edited by phantastes at 02/22/2011 19:23
  7. Have you tried: select u.firstName from User u Magnus
  8. Hi, You could also leave out the java.util. part: Code:"Some text "+new SimpleDateFormat("MM/dd/yyyy").format($P{startDate})+" to "+new SimpleDateFormat("MM/dd/yyyy").format($P{endDate})+" some other text"
  9. My aplogies if this has already been discussed in another thread in this forum. There is a thread in the iReport forum: http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=82847 that discusses the changed handling of null in Jasper Reports 4.0. In short : $F{aField} == null ? "first": "second" would never return "first". Does anyone know if this issue has been addressed? Regards, Magnus
  10. Not sure if this will help, but it might be worth a try. Do you have a query in the main report? If not just add a very simple query to the main report and try again.
  11. Hi, it does seem like an issue that could potentially throw off quite a few reports though, since the null check is not uncommon (at least not in my experience). Would this need to be filed as a bug? Since it seems to go against the backward compatibility that Jasper Reports has been quite good at maintaining. Magnus
  12. I'll be there too. Flying out tomorrow, Saturday, from Boston. See you there! Magnus
  13. Yeah! I got it too, about time! But you guys should probably have Someone or Somebody take a look at the forum security. Magnus
  14. It seems that evereone who is a bit more involved with Jasper has gotten their Karma downgraded to -666. It certainly looks like the forum got hacked. mdahlman - And I'm ahead of both of them! Magnus
  15. How come Giulio has karma -663? That does not seem quite fair, seeing how helpful he is. Magnus
  16. Hi Matt, Thank you for the prompt reply! Will we need to buy the license for version 4.0 or does the license we bought for 3.7.0 cover these kind of updates? See you at JasperWorld 2011? Magnus
  17. You need to be more specific. Give us an example. Magnus
  18. Hi, Try this. It might look the same as what you had but what you acually need to to is to concatenate the "AND Billing.Company_Code = " with the parameter $P{CompanyCode}. You had the parameter inside the already existing string which will not yield the value of the parameter but instead the actual text $P{CompanyCode}. Hope this helps. Code:$P{CompanyCode}.isEmpty() ? "" : "AND Billing.Company_Code = "+$P{CompanyCode}
  19. Hi, I've the iRepot Professional version 3.7.0. I need the professional version since we are using the flash charts. Now I also need to use Tables. Tables are not available until 3.7.2. How can I use the latest version of iReport but still use the iReport professional components? Unless I'm missing something very obvious it seems that if you use the iReport professional edition you will not be able to use the latest version of iReport. Any thoughts on this?
  20. That's awesome! It worked. I also added a check to make sure not to add duplicate numbers, plus making sure there is no comma at the end: Thank you so much for you help! Magnus Code:$V{idList}.equalsIgnoreCase("")?$V{idList}.contains($F{id}+"") ? $V{idList}:$V{idList}+$F{id}:$V{idList}.contains($F{id}+"") ? $V{idList}:$V{idList}+","+$F{id}
  21. Hi Carl, Thank you for that quick reply! Would you be able to expand a bit on what you set the other Variable properties to, such as the calculation etc. All the best, Magnus
×
×
  • Create New...