Created at runtime: Memotext cut off at right margin
Hello.
I create a report at runtime.
The problem is, I use TfrxReportPage.PageWidth as a guide for fitting the columns.
The Columns combined size in pixels is 745 and TfrxReportPage.PageWidth is 794, but still the last column does not fit.
Any ideas how that works?
(May be connected but I'm not sure, I've seen someone use SetBounds(X,Y, PageWidth - 75.6, Height), why they distract 75.6 from PageWidth I have no idea).
The columns are added to Masterdata in a loop, with fColumnList being a collection of columns in a Generic list( fColumnList : TList<TfrField>):
With regards,
Gisli
I create a report at runtime.
The problem is, I use TfrxReportPage.PageWidth as a guide for fitting the columns.
The Columns combined size in pixels is 745 and TfrxReportPage.PageWidth is 794, but still the last column does not fit.
Any ideas how that works?
(May be connected but I'm not sure, I've seen someone use SetBounds(X,Y, PageWidth - 75.6, Height), why they distract 75.6 from PageWidth I have no idea).
The columns are added to Masterdata in a loop, with fColumnList being a collection of columns in a Generic list( fColumnList : TList<TfrField>):
With TfrxMemoView.Create(fDataBand) do
begin
SetBounds(X, Y, aWidth, 16);//fr01cm * 5);
Dataset := fReportTable;
GapX := fColumnList[i].Margin;
DataField := fColumnList[i].dkField.FieldName;
Style := 'Data';
if fColumnList[i].IsNumber then
begin
HAlign := TfrxHAlign.haRight;
HideZeros := fHideZeros;
end;
StretchMode := smActualHeight;
WordWrap := FALSE;
end;
With regards,
Gisli
Comments
the left of the first memoview should be 0.
the next should be 0+ 1stmemo's width + any space, and so on
for a quick check of what you have created call designreport instead of showreport.