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

sanbez

Members
  • Posts

    296
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by sanbez

  1. @marlin_snyder

    From ireport-ultimate-guide.pdf :
    In the condition expression you can use all the properties of the report object. Please note that the conditions cannot be generic,
    for instance, you cannot set a condition like “if the number is positive” or “if the string is null.” You must be very specific,
    specifying, for example, that a particular value (field, parameter, variable or any expression involving them) must be positive
    or null, and so on.

    I have similar problems :(

  2. I am don't understand exactly yuor questions. Is OPENUM private field must be present in all javaBean?
    Example:
    public class A1() {

    private String openum;
    public String getOpenum();
    private String field2;

    }

    public class B1 {
    private String openum;
    public String getOpenum();

    private String field3;
    ...

    }

    This two different classes. You want to use it's in JRBeanCollectionDataSource for ONE report. Is I am understand correctly?
    In this way you can rewrite classes with using inheritance:
    public class Parent {
    private String openum;
    public String getOpenum();
    }
    public class A1 extends Parent {

    private String field2;
    }
    public class B1 extends Parent {
    private String filed3;
    }

    Collection src = new ArrayList();
    src.add(new A1(...))
    src.add(new A1(...))
    JRBeanCollectionDataSource dest = new JRBEanCollectionDataSource(src);  - use it for first report

    or
    Collection src = new ArrayList();
    src.add(new B1(...))
    src.add(new B1(...))
    JRBeanCollectionDataSource dest = new JRBEanCollectionDataSource(src);  - use it for same report
     

  3. after insert query in this subreport:

    select '2013-1-6' competent_date, 'Value 1' skill_set from dual union all

    select '2013-1-6' , 'Value 2' from dual union all

    select '2013-1-5' , 'Value 3' from dual union all

    select '2013-1-5' , 'Value 4' from dual

     

    I am get next output:

    2013-1-6

    Value 1

    Value 2

    2013-1-5

    Value 3

    Value 4

     

    Are you get same result when only subreport run (without main report)?

  4. I am try to use "Order by exp." for Column Groups, but I could not get it to work :( Columns sorted always by bucket expression in my crosstab.

    In your case "data-presorted" options is not work (i guess) because order record in sql-query the same as in crosstab (alphabetic). Try to add field in query (numberOfMonth = 1,2,3) set order by "numberOfMonth" in query and set "data presorted" for crosstab.

     

  5. Problem solved by same steps:
    1. Set "None" to display row-summary and column summary
    2. Calculate summary for row in java (calculate DataSource collection)
    3. Calculate date of max and add row with max to collection (in java). In this row set dateMax = realDateMax+10000 years (It's for display in last row in report)
    4. Date expression in jrxml: $V{peakDate}.getDate().getTime()>4000000000000L ? my.package.name.addYear($V{peakDate}.getDate(),-10000) : $V{peakDate}.getDate()     (Display correct data in last row)

    It will be work only before 2096 year. It's enough for me :)

  6. "All the variables, and fields and Text Fields in the report are set to java.math.BigDecimal"
    Stack trace says otherwise. My version JR is different from your version. I can not determine exactly where the error occurred. "My" src of jasper have empty 335 line at place
    net.sf.jasperreports.engine.fill.JRBigDecimalSumIncrementer.increment(JRBigDecimalIncrementerFactory.java:335

    Source jasper have this lines (in my version, but in another place):
    BigDecimal value = (BigDecimal)variable.getIncrementedValue();
    BigDecimal newValue = (BigDecimal)expressionValue;

    Check expression (?) in your jrxml (may be it's cast to Integer (?)). Check type of parameters, may be problem here.... and so on
    Without source code jasper and without jrxml we have only guess
     

  7. I am use java (ORM) for DataSource (new JRBeanCollectionDataSource(Collection)).  I don't use query. And using additional query requred additional time for calculating report. It's not effective.

    Now I am think that better way is calculating max in java. I will add additional record into DataSource collection with total max. But in this case many data (sum for row? total sum) must be calculated "by hand". And I must add private field in "Date-object" for sorting (to display summary in last row.). It's not effective too :(
    And formatting summary in row, total summary is more difficult. And power of JR is not using. Only display "pre-calculated" objects... :(  

    Now I'm in a sad meditations :(

  8. How to display row with max summary value in last row? I am using IncrementerFactory implements JRExtendedIncrementerFactory.
    But I am can't understand how "to say" jasper calculate sum in row (it's realized) and max (with Date of max - it's problem for me) for same measure of crosstab.
    Any "date" (first column) is java-object with private field java.util.Date and java.lang.Boolean (it "marks" records for calculating maximum).

    Full report:

    converted-file.png.c75c7e29d82180be103ba725056fcfcf.png

    In last(sum) total row I want to see row with data (instead of row "Max(date, values), etc..."):

    converted-file.png.26a09d13245f88098630b17bda40abbd.png

    Any advice greatly appreciated!

×
×
  • Create New...