[fpc-pascal] FPReport: Split text across two or more pages
Michael Van Canneyt
michael at freepascal.org
Fri Feb 16 14:05:08 CET 2024
On Fri, 16 Feb 2024, Pique7 via fpc-pascal wrote:
> On Mon, 8 Jan 2024 22:08:16 +0100 (CET)
> Michael Van Canneyt via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
>>
>>
>> On Mon, 8 Jan 2024, Pique7 via fpc-pascal wrote:
>>
>>>> Disregarding the RTF for a moment, you'd need to save the contents of the
>>>> text fields in a TStringlist instance in the 'afterscroll' event of the dataset.
>>>>
>>>> This instance can then be used to create a data loop for a sub band
>>>> (using TFPReportUserData).
>>>> The band connected to the dataset (the master band) would not print anything.
>>>> Instead, the child band will print the cell content line by line and split it over pages.
>>>>
>>>> From your drawing, it is not quite clear how you construct your columns,
>>>> if you're using columns, I'm not sure how the band will behave.
>>>>
>>>> Michael.
>>>
>>> Thanks again for your suggestions. I haven't tried it yet but now I've got the idea. Your are so optimistic but I still fear all the things which might make troubles in a more complex report with grouping, master/detail data, calculations, layout adjustments, HTML tags, table borders etc.
>>>
>>> However, finally I've tried to extend/improve the original FPReport classes and now I really have a FPReport version that supports band splitting for simple FPReportMemos.
>>> I was not able to implement this using inheritance - I've had to change the original source code in the FPC folder.
>>> Without any doubt there are still many bugs in my FPReport. But if you want a copy, let me know! :-)
>>
>> I am always open for improvements.
>> Please do send me your sources or a diff...
>>
>> Michael.
>
> I have just started to resume my work on FPReport. I have found some errors in my first version and currently I am trying to add RTF support. I utilize TRichMemo for this because I think it is sufficient for my case (I only develop and test for Windows 10/11 at the moment). Also SVG support is wanted.
> What would be an appropiate way to provide my work and partial results? As I deal with the FPC source code, your opinion and suggestions might be particularly meaningful.
SVG support for FPC (and consequently FPReport) is on my wishlist.
RTF support using TRichmemo is useless for FPC itself as FPReport needs to be free of LCL or other dependencies.
If at some point RTF support is added, it will be using the RTF parser included in Free Pascal.
If you wish to submit contributions, you can supply patches using the gitlab issue tracker.
The RTF support for FPReport can of course be submitted to the Lazarus issue tracker or
kept on github or some other repository...
Michael.
More information about the fpc-pascal
mailing list