Table where each row is a subset of the previous row

0

I am new to Jasper and I have a complex report to build where each row of a table filters the values in the previous row by some additional criteria.

For example say I have a Customer table and I want a report that count the number of customers that meet certain criteria, each row of the report is a subselect from the previous row:

All customers
  Customers with surname beginning with A
    Customers with surname beginning with A who llive in London
    Customers with surname beginning with A who llive in Manchester
    Customers with surname beginning with A who llve elsewhere
  Customers with surname beginning with B
    Customers with surname beginning with B who llive in London
    Customers with surname beginning with B who llive in Manchester
    Customers with surname beginning with B who llve elsewhere

etc.

How can I do this? The only way I can think of is to use a complex SQL query with an inline query for each row of the output, but it seems very inefficient to keep repeating the same query and adding to the WHERE clause. Is there a better way?

tspencer's picture
Joined: Jul 1 2013 - 8:02am
Last seen: 5 years 4 months ago

0 Answers:

No answers yet
Feedback