Hi,
I have the following demand from a customer for invoicing:
The customer wants to be able to group articles beneath titles and optionally have subtotals per title.
So, he would like to have for instance:
Title
Article 1
Article 2
Total Title
Title 2
Article 1
Article 2
Total Title 2
General total
The difficulty is that it should be able to work multi-level, meaning that it should be able to handle for instance the following:
Title 1
SubTitle 1
Article 1
Article 2
Total SubTitle 1
SubTitle 2
Article 3
Article 4
Total SubTitle 2
Total Title 1
General total
The display of the totals for the subtitels should also be optional.
Yes, FlexCel should be able to assist you to get this task done efficiently. I myself always try to find an example from Adrian, the FlexCel mastermind. I always start with the Reports Designer Guide.
One of the sections is called Master-Detail and does reflect your use-case in my opinion. Even with direct binding to a data set this should be possible. The aggregates can either be calculated in your Excel template or in Delphi. It's going to be your choice which approach is easier with regard to your data source.
Hope this gets you started. Let us know if you need further assistance.
The dynamic nature of the report, where you can have master-detail1-detail2 or master-detail1-detail2-detail3. The reporting engine in FlexCel doesn't support dynamic "on the fly" different levels of sub-sub-sub bands, but if you know in advance the maximum level of subdetails, then that should be no problem. Say, if you know you have at maximum 5 levels, then you can do a report with 5 nested details. If the report has only 3 levels, level 4 and 5 just won't run, they will be deleted and the report will be ok. What is not really possible is to have an unbounded level of details. If that is a requirement, that would likely require using the API, not the reports.