Crosstab report

Is there a sample of how to create a crosstab (or matrix) report ?

Hi, CK.

From what I have seen of the report generator included inside CUBA is not possible, or if it’s possible but it requires a lot of effort. For the lack of answers to your question, I imagine that no one has done so far. What for me if it’s safe and reliable is to use Jasper, which comes with the requirement that you want and you are going to fix it.

Maybe this can help.

Hi.

Using CUBA reporting system you can generate Crosstab/Matrix report.

The sample could be found in YARG integration tests. Launch the testXlsxCrosstab() method.

I have also created a little sample project.

Create several Operators and Calls. Then import and run the report “Crosstab.zip” (it is in the root directory).

How it works:

  1. The horizontal band “Operators” has the vertical child band “Data”.
  2. Child band uses a result from parent band as the query parameter.

In this way, the data could be printed in matrix. Note, that YARG allows only horizontal bands to have children!

Regards.

Hi
Looks interesting. Is it also possible to visualize crosstab in any UI component inside CUBA applications in addition to report?

No, reports produce only separate output. The only exception is reports with Chart output type - you can display them in the application.

The sample crosstab project is helpful. Thank you.

How can we can add a total column to the crosstab report? i.e… total calls for each operator in the last column of the sample crosstab report.

1 Like

In addition to the individual line total, how to add a grand total line at the end of the report?

I tried to use formula to sum the vertical columns but it resulted in error in the xlxs document.