0

I have a report that displays the below data:

Bill        | Status   | Value
Food        |  Paid    |   10
Gas         |  Overdue |   15
Electricity |  Open    |   20
Fun         |  Paid    |   25

What I need is to display total by status which, in this example, would be 35 for paid bills, 15 to overdue bills and 20 to open bills (I don't know if open is the English term to a bill that is not overdued and not paid yet either).

This question is not duplicate with question How to sum all values in a column in Jaspersoft iReport Designer? because what I need is to sum bill values by its status field and not to sum all values regardless of the status field.

This question is not duplicate with question Grouping records in JasperReports either because I can't change report layout and group its data. What I need is to display totals by status which I'm already doing programatically in Java and passing these three kind of totals by report parameters.

Philippe Gioseffi
  • 1,488
  • 3
  • 24
  • 41
  • It is a bad idea to repost the same question. All you need is to use variables as described at [How to sum all values in a column in Jaspersoft iReport Designer?](https://stackoverflow.com/q/13550514/876298) – Alex K Aug 12 '20 at 16:50
  • `What I need is to display totals by status which I'm already doing programatically in Java and passing these three kind of totals by report parameters` - Do you need to show parameter at report? – Alex K Aug 12 '20 at 16:53
  • @alexk That's not what I need. The answer to the question you are referring to is to sum field values regardless of the status field and this I know how to do it. – Philippe Gioseffi Aug 12 '20 at 16:54
  • @alexk I don't need to show parameters, I need to show totals, but the only way I could achieve that was by summing values by its status in Java and passing them as parameters. – Philippe Gioseffi Aug 12 '20 at 16:58
  • @AlexK, any help? – Philippe Gioseffi Aug 20 '20 at 18:37

0 Answers0