View Issue Details

IDProjectCategoryView StatusLast Update
0032152LazarusPackagespublic2017-07-19 16:36
ReporterSoner Assigned ToJesus Reyes  
Status closedResolutionno change required 
Product Version1.6.4 
Target Version1.8Fixed in Version1.7 (SVN) 
Summary0032152: Report ColumnWidths Calculated wrong, here is possible solution for this bug.
DescriptionIf your report has more than two column the last column does not fit in the page, because the column widths are calculated wrong. Here is possible the solution. Change in 2 files ony one row (copy the next lines in lazarus):

//1. In File: LR_Desgn.pas, in the middle:
procedure TfrDesignerPage.Draw(N: Integer; AClipRgn: HRGN);

      with FDesigner.Page do

      //change here ...
          //soner original was this: ColWidth := (RightMargin - LeftMargin) div ColCount;
          ColWidth := ((RightMargin - LeftMargin) div ColCount ) - (ColGap*(ColCount-1)); //soner: ColWidth:= (PrintAreaWidth div Colcount) - ColGaps
      // ... until here 1 line
          Pen.Style := psDot;
//2. In File: LR_Class.pas, at the end
procedure TfrPage.TossObjects;
  if ColCount = 0 then ColCount := 1;
  // change below:
  //soner original was this: ColWidth := (RightMargin - LeftMargin) div ColCount;
  ColWidth := (RightMargin - LeftMargin - (ColGap*(ColCount-1))) div ColCount ; //soner: ColWidth:= (PrintAreaWidth-ColGaps) div Colcount

Steps To Reproduce1. Open Report-designer
2. Change in Menug [Page Options]
   Tabsheet [Options]
   Following properties:
Columns more than 2,
Column Gap: 5

3. CLick ok

4. Now when you can measure column widths with a memo then you will see that the last column is over the right margin.
 or click preview
Additional InformationI put possible solution in Description.
TagsNo tags attached.
Fixed in Revision
Attached Files


duplicate of 0030367 resolvedJesus Reyes Multi-Column report - column widths incorrectly calculated 



2017-07-16 14:09


lazrep-colwidth-bug.7z (99,122 bytes)

Jesus Reyes

2017-07-18 03:01

developer   ~0101751

Probably this was fixed by r52677 see related bug report.

Please test with Lazarus 1.8 RC3 or Trunk and reopen this report if the bug is not yet fixed, on the contrary please close this report.

Issue History

Date Modified Username Field Change
2017-07-16 14:06 Soner New Issue
2017-07-16 14:09 Soner File Added: lazrep-colwidth-bug.7z
2017-07-18 02:58 Jesus Reyes Assigned To => Jesus Reyes
2017-07-18 02:58 Jesus Reyes Status new => assigned
2017-07-18 02:58 Jesus Reyes Relationship added duplicate of 0030367
2017-07-18 03:01 Jesus Reyes LazTarget => 1.8
2017-07-18 03:01 Jesus Reyes Note Added: 0101751
2017-07-18 03:01 Jesus Reyes Status assigned => resolved
2017-07-18 03:01 Jesus Reyes Fixed in Version => 1.7 (SVN)
2017-07-18 03:01 Jesus Reyes Resolution open => no change required
2017-07-18 03:01 Jesus Reyes Target Version => 1.8
2017-07-19 16:36 Soner Status resolved => closed