Endellipsis in text
Hello!
I need some help for some last polish of several reports.
First, I am looking for a facility to define something like an EndEllipsis.
I have some texts which are (sometimes) too large to fit within a given text object. I don't want to use word wrapping and stretching but would like to have them formated like "This is a long text wh..." instead of just cutting them off at the end.
How to achieve this?
Secondly, it sometimes happens that a GroupHeader is printed on the end of a page but it's MasterData starts on the next page. I played around with "KeepTogether" as I thought this might be good to control this behaviour but didn't have had any effort.
How to achieve this?
Besides of that, I do like FastReport really very much and will recommend it.
Many thanks,
Stefan
I need some help for some last polish of several reports.
First, I am looking for a facility to define something like an EndEllipsis.
I have some texts which are (sometimes) too large to fit within a given text object. I don't want to use word wrapping and stretching but would like to have them formated like "This is a long text wh..." instead of just cutting them off at the end.
How to achieve this?
Secondly, it sometimes happens that a GroupHeader is printed on the end of a page but it's MasterData starts on the next page. I played around with "KeepTogether" as I thought this might be good to control this behaviour but didn't have had any effort.
How to achieve this?
Besides of that, I do like FastReport really very much and will recommend it.
Many thanks,
Stefan
Comments
call engine.newpage
Thanks. This works. Although I would have expected that such behaviour is default. I think that a header (which is being repeated on each page) does not make too much sense at the end of a page.
I guess there's no easy way to implement the "end ellipsis" (three dots...) instead of cutting long texts?
procedure Memo1OnAfterData(Sender: TfrxComponent);
Var
s : String;
i : Integer;
wd : Extended;
memo : TfrxMemoView;
begin
memo := TfrxMemoView(Sender);
s := memo.Memo.Text;
if memo.CalcWidth>memo.Width then
for i:=Length(s) downto 1 do begin
memo.Memo.Text := Copy(s,1,i)+'...';
wd := memo.CalcWidth;
if wd <= memo.Width then break;
end;
end;