Recent

Author Topic: Some thoughts and ideas for a better, useful fpReport  (Read 3665 times)

af0815

  • Hero Member
  • *****
  • Posts: 555
Re: Easy to solve problem (I think) with fpReport
« Reply #15 on: December 17, 2019, 09:46:01 pm »
could be ..... but actual is not.

Maybe some bounties will be accepted.
regards
Andreas

MacWomble

  • Jr. Member
  • **
  • Posts: 77
Re: Easy to solve problem (I think) with fpReport
« Reply #16 on: December 18, 2019, 08:11:47 am »
Maybe a bounty helps, but I think there are not as many Users for fpreport as thought.
We seem to be the only two, working with it (or try to do) ...  >:D

Sadly I found a new problem exactly in the functionality wich makes me using fpreport:

Bold text in a memo overwrites the following text in this field. (The following text is not shifted)
(attached file)

This makes fpreport absolutely useless for me now ... :( :o

« Last Edit: December 18, 2019, 04:31:58 pm by MacWomble »
Mint 19.3 Cinnamon, FPC/ Lazarus Trunk 64Bit

af0815

  • Hero Member
  • *****
  • Posts: 555
Re: Easy to solve problem (I think) with fpReport
« Reply #17 on: December 18, 2019, 04:45:19 pm »
You mean this in 'Testartikel 3':

amet is overwriting the following colon and the start of conseteur

In this line it is most visible. In the other it is not so strange.
 
regards
Andreas

MacWomble

  • Jr. Member
  • **
  • Posts: 77
Re: Easy to solve problem (I think) with fpReport
« Reply #18 on: December 18, 2019, 07:05:55 pm »
You mean this in 'Testartikel 3':

amet is overwriting the following colon and the start of conseteur

In this line it is most visible. In the other it is not so strange.

But it is in the other lines also.  :(
It is in Testartikel 3 better visible because its more text in bold.

I'm on a good way with my invoice report with csv, but this (bold-problem) is very bad now.
OK, to be honest: I do not give up this time and do some more tests with fpreport.
The bold-problem could disharmed a bit, when I insert one more blank after the bold text.
But this is a workaround, not a solution.

I renamed this thread now so the topic is clearer
« Last Edit: December 18, 2019, 07:17:16 pm by MacWomble »
Mint 19.3 Cinnamon, FPC/ Lazarus Trunk 64Bit

af0815

  • Hero Member
  • *****
  • Posts: 555
Re: Some thoughts and ideas for a better, useful fpReport
« Reply #19 on: December 18, 2019, 08:26:27 pm »
I think the issue is in the calculation of
Code: Pascal  [Select][+][-]
  1. function TFPReportCustomMemo.TextWidth(const AText: string): TFPReportUnits;
  2.  
there is a comment
Quote
  // TODO: FontName might need to change to TextBlock.FontName.
The comment is correct, because in
Code: Pascal  [Select][+][-]
  1. procedure TFPReportCustomMemo.HTMLOnFoundText(Text: string);
  2.  
the calculation of the textblock is wrong, because the textwidth (and texthight) function is working with the wrong Font.

This is IMHO fast fixable.

regards
Andreas

MacWomble

  • Jr. Member
  • **
  • Posts: 77
Re: Some thoughts and ideas for a better, useful fpReport
« Reply #20 on: December 18, 2019, 08:39:20 pm »
 :)

Attachment shows a report generated of csv with master, detail, subdetail, more soon
« Last Edit: December 18, 2019, 09:18:35 pm by MacWomble »
Mint 19.3 Cinnamon, FPC/ Lazarus Trunk 64Bit

af0815

  • Hero Member
  • *****
  • Posts: 555
Re: Some thoughts and ideas for a better, useful fpReport
« Reply #21 on: December 18, 2019, 10:55:38 pm »
Can you insert sources of the report too, thx.

I have prepared a fix for the last issue. It is compiling for me.
regards
Andreas

MacWomble

  • Jr. Member
  • **
  • Posts: 77
Re: Some thoughts and ideas for a better, useful fpReport
« Reply #22 on: December 19, 2019, 08:07:59 am »
Your patch works great and I think you should commit this patch - Thank You !  :)

I am still playing around with this but here are the sources.

What I found:
- The long texts will only work up to 256 chars! Longer text will be truncated.
- TextAlignment - Horizontal = taWidth only works for first line of a memo.
« Last Edit: December 19, 2019, 09:03:54 am by MacWomble »
Mint 19.3 Cinnamon, FPC/ Lazarus Trunk 64Bit

 

TinyPortal © 2005-2018