Jump to content

phantastes

Members
  • Posts

    107
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts 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. 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

  6. 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

  7. 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

  8. 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} 
  9. 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?

     

×
×
  • Create New...