Jump to content
Changes to the Jaspersoft community edition download ×

Crosstab Only


Recommended Posts

By: Greg Reddin - greddin

Crosstab Only

2006-06-07 08:20

Most of our reports consist only of a crosstab. Jasper doesn't really seem to want to treat crosstabs as first-class citizens like this. The model seems to be that crosstabs should be a subset of the report. I've hacked it by performing a dummy count() query as my main report query and providing a subdataset with the real query in it for the crosstab. It's very ugly, but it works. Is there a better way to do a report that is basically only a crosstab? I'd almost like to just access the crosstab engine and use it to generate a table in HTML, PDF, or Excel format. Is this possible or planned?

 

 

 

 

 

By: Lucian Chirita - lucianc

RE: Crosstab Only

2006-06-09 10:14

Crosstabs were designed as report elements to allow full flexibility in their usage. You can easily create a report containing a single crosstab.

 

I'm not sure what you mean by crosstabs being subsets of reports. Could you elaborate on this?

 

I don't see any reason for the dummy report query. Crosstab do not necessarily have to use a subdataset, they can aggregate the data from the report datasource (i.e. the query result if the report has a query).

 

Therefore, you can create a report without a detail band, put the crosstab in the report summary and define the crosstab dataset not to extract data from the report datasource. Check demo/samples/crosstab/OrdersReport.jrxml for an example.

 

HTH,

Lucian

 

 

 

 

By: Greg Reddin - greddin

RE: Crosstab Only

2006-06-13 12:51

This was a misunderstanding on my part. I didn't realize you could create a report with no detail band. I was using iReport and it would always create a detail band for me. iReport 1.2.2 would not display the report if I set the detail band height to 0. iReport 1.2.3 will display it. Also, I was able to get better results by editing the XML by hand and running the report through an ant script.

 

Crosstabs are working good for me now.

 

Thanks,

Greg

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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