This could have gone into any of four forums here, so popped into this one

We have a requirement to:
- read a binary blob and decode it into a formatted report.
- the report has a standard structure and positioning of titles, headers, section, detail, summary, footer.
- however we need to adapt the report to 20 project rules read in from the db.
- each rule will change the layout of the report, for example it might add or remove columns, or format column values differently, or add colour to text, or change the source of data for a column, etc.

Thus there is a logical workflow for the report...

- load rules
- print title section
- according to rules
- print header section
-. According to rules
- read all rows source data
- for each row
- setup columns headers according to rules
- for each column
- process row column according to rules
...
...

Rules might be;
UseNumbersForIssue=true
UseLettersForIssue=true
VariantWidth=5
Count=true
UseColours=true
Title=nnnnnnnnnnn
SectionSize=20
...


Questions
What Java pattern would be most suited and can you give a rationale with outline example outline of class structure , we don't need detail code just the class hierarchy..

Thanks