Created at runtime: Memotext cut off at right margin

edited 12:15PM in FastReport 4.0
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 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

  • gordkgordk St.Catherines On. Canada.
    edited 12:15PM
    you probably forgot about page margin values.
    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.