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

thanapolr

Members
  • Posts

    1
  • 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

Posts posted by thanapolr

  1. Hello,

    I try to use crosstab to show data from javabean.

    My bean, PerformanceData, has four fields, "month", "week", "category", "subcat", and "data".

    I use "month" and "week" as a row group, and use "category" and "subcat" as a column group.

     

    The problem is my crosstab in the report doesn't show anything. I have already set the compatibility to 1.2.0 version.

     

    The following is my code.

    Code:

    ...

    PerformanceData[] dd = new PerformanceData[2];
    for (int i=0; i< dd.length; i++)
    {
    dd = new PerformanceData();
    dd.setData ((float)i);
    }
    dd[0].setMonth ("month0"«»);
    dd[0].setWeek ("week0"«»);
    dd[0].setCategory ("cat0"«»);
    dd[0].setSubcat ("sub0.0"«»);

    dd[1].setMonth ("month1"«»);
    dd[1].setWeek ("week1"«»);
    dd[1].setCategory ("cat1"«»);
    dd[1].setSubcat ("sub1.1"«»);

    JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(Arrays.asList (dd));

    jasperPrint = JasperFillManager.fillReport (jasperReport, parameters, dataSource);

    JasperViewer.viewReport (jasperPrint, false);

     

    My .jrxml is in an attached file

    [file name=test2.jrxml size=21907]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/test2.jrxml[/file]

     

    Thank you,

    Thanapolr

    Post edited by: thanapolr, at: 2006/08/15 11:30

×
×
  • Create New...