Jump to content

datasource question for a crosstab


sulalith

Recommended Posts

Hi:

 

I have a report where I need to create a crosstab from a list containing objects of type Bj. The class definitions are shown below...

 

public class Bj {

String id;

String bjName;

List listOfBoiObjects; // objects for type Boi

}

 

public class Boi {

List listOfAstObjects;

String id;

String boiName;

}

 

public class Ast {

String astName;

String familyName;

String mic;

String category;

}

 

 

The crosstab columns and rows looks like this..

 

-------------------------------------

| boiname-1 | boiname-2 |

-------------------------------------

| mic | category | mic | category |

----------------------------------------------

astName-1| 12 | none | -1 | neg |

----------------------------------------------

astName-2| 5 | sub | | |

-----------------------------------------------

 

 

The problem is that JasperReport would go through one Bj object at a time but I want to be able to feed the crosstab the listOfAstObjects for each Bj object and have all the results in the same crosstab. Is this possible?

 

Thanks,

 

Sulalith

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

 

I suggest you create your own JRDataSource implementation that would iterate on exactly what you want.

If you want to know how to implement data sources, you can look into the existing JR data source implementations or in the supplied /demo/samples/datasource sample.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...