feature request: More than one Databand per page without master detail relationships needed
Original Reporter info from Mantis: af0815 @afriess
-
Reporter name: Andi Friess
Original Reporter info from Mantis: af0815 @afriess
- Reporter name: Andi Friess
Description:
I have data inside of ObjectsList=OL (here in the demo two) and i want to report one OL by one. This should be done continuos and each OL have their own layout. There is no master-detail. After one OL is finished the next should be processed and appended, if the one page is finished, it should continued on the next page. This works for lReportOLData1 ok, but lReportOLData2 is never used/seen/reported.
You need this, if you have a 'compound' Report, where you need to collect different sources. And the sources have no 'master-detail' glue.
Steps to reproduce:
You see the problem with the FPReport Designer too.
- Make a new report
- add two datasets (eg, csv with valid data)
- add PageheaderBand, TitleBand and PageFooterband
- add a Databand bound the Data1 to it
- add a Databand bound the Data2 to it
Make a Report Preview -> only the contend of the first dataset is shown.
Additional information:
From fpc-pascal Mailinglist 2021-03-19
For clarity: it's as designed, but that doesn't mean I won't consider
changing the design. Just don't report it as a bug, because it is not.
Michael.
For the record, is this written downwhat is 'by design' ?
No. There are testsuites and some pages in the WIKI I obviously don't expect people to deduce the behaviour from those sources.
For me it is a bug, because i can design a unuseable not working second
Databand and i got no message. Nor Designtime, nor runtime.
I expected this comment, and to a certain degree I can see your point.
But for me this is more akin to 'don't put your cat in the microwave to dry it'
you can do it, but don't expect satisfactory results
If it is not
a bug, so a featurerequest must be possible, because other reports can
handle this without a problem.
You can definitely submit a feature request. For severity, simply select 'feature'.
For completeness:
In general implementing it may be not so trivial as it seems:
First: If there are 2 (or more) data bands, which one should I treat first ? The one that comes first in the internal list of bands, or the one that comes first
when you visually design the report, or the dataset that comes first in the
list of report data sets ? These orderings may not be identical....
Second:
For me it is also a question whether you should first loop the data of the
first data band, and then loop the next. This is your case if I understood
you correctly.
An equally valid approach would be to print one data band, then the other.
Then advance both datasets. etc.
Which one to take depends on what output you need, obviously.
(which is what I remarked on in my first reply)
Then the treatment groupings must be considered, page jumps etc.
Just to say it's far from trivial. That is why I initially suggested making a second page in the report, because then this is all much less ambiguous.
But please submit a feature request, I will try to find a good solution. For the time being, your approach with fake master detail will need to suffice...
Michael.
--------------
I am not able to set the severity to feature
Mantis conversion info:
- Mantis ID: 38639
- OS: Win10 / 64 Pro
- OS Build: Win10 / 64 Pro
- Platform: Dell XPS
- Version: 3.3.1