Memoviews in masterdata band not shifting properly

I???m using FastReport 4 Pro with Delphi 2007. I have a MasterData band connected to a TfrxUserDataSet, which uses a TStringList.

The MasterData band has the following properties:
AllowSplit = True
Stretched = True

The MasterData band contains a memoview that has the following properties:
Align = baWidth
ShiftMode = smAlways
StretchMode = smActualHeight
WordBreak = True
WordWrap = True

Sometimes the memoview will contain a value that is very long and may span multiple pages. When that happens, the memoview for the next record is not shifted properly and will overlap the end of the long record. The amount of overlap gets worse the longer the previous record value is and also gets worse using more columns. Attached is an image of the spacing problem with 1(no) columns and another image with 4 columns.

The spacing problem only seems to occur with the first record following a record with a long value. Even the second record after the long value seems to space correctly.

Any ideas what???s happening or what I can do to fix it?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:07PM
    try stretch mode smmaxheight
  • edited 4:07PM
    gordk wrote: »
    try stretch mode smmaxheight

    Thanks, but that didn't change anything.
  • gordkgordk St.Catherines On. Canada.
    edited 4:07PM
    post a screen shot of your report design area of the master data band
  • edited August 2013
    gordk wrote: »
    post a screen shot of your report design area of the master data band

    Attached is the screen shot. This is a simplified version (although not by much) of my report that shows the problem. The report is set up with 4 columns, which is why the band looks so narrow.
  • gordkgordk St.Catherines On. Canada.
    edited 4:07PM
    are you saying you only have 1 memoview in the column.
    Please when i ask for a screen shot do not sub something else
    I am looking for obvious errors.
  • edited August 2013
    gordk wrote: »
    are you saying you only have 1 memoview in the column.
    Please when i ask for a screen shot do not sub something else
    I am looking for obvious errors.

    Yes, only one memoview in the column. The report in the screen shot has the problem. As part of my own debugging, I reduced my original report to the simplest version that still demonstrates the problem. The screen shot shows that simplest version and that version *does* have the problem.

    As I said in my original post, this memoview sometimes has a large amount of text spanning several pages, and the problem only happens with the record that then follows the record with the large amount of text. Everything else seems to shift correctly.
  • gordkgordk St.Catherines On. Canada.
    edited August 2013
    Save the output to an fp3 file and post or email it to me.
    gord@fast-report.com
  • edited August 2013
    gordk wrote: »
    Save the output to an fp3 file and post or email it to me.
    gord@fast-report.com

    The forum wouldn't let me post the FP3 file so I emailed it to you.

    Thanks.
  • gpigpi
    edited 4:07PM
    Try to set memo's ShiftMode to smWhenOverlapped
    And attach your report template (fr3) here
  • edited 4:07PM
    gpi wrote: »
    Try to set memo's ShiftMode to smWhenOverlapped
    And attach your report template (fr3) here

    I tried smWhenOverlapped but I still have the problem. Template attached.
  • gpigpi
    edited 4:07PM
    works ok for me
    See attach
  • edited 4:07PM
    gpi wrote: »
    works ok for me
    See attach

    Thanks for looking at it but your report is not the same as mine. You don't have a memoview field with a text value so large that it spans multiple pages. That's when I have the problem.

    Use the following code to populate a TStringList:
    var
      sTemp:  String;
      iIndex: Integer;
    begin
      fList.Add('Record 1: [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], ' +
          '[b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b]');
      sTemp := '';
      for iIndex := 1 to 2000 do
        sTemp := sTemp + '[b]QU12345[/b], ';
      sTemp := sTemp + 'QU99999';
      sTemp := 'Record 2: ' + sTemp;
      fList.Add(sTemp);
      fList.Add('Record 3: [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], ' +
          '[b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b]');
      fList.Add('Record 4: [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], ' +
          '[b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b], [b]QU22222[/b]');
    
    Change your report to use a TfrxUserDataSet and setup the relevant events for the report to use the TStringList. You will see that the beginning of "Record 3" overlaps the end of "Record 2".

    I know this example looks artificial, but I can assure you we have real data that looks something like this.

    Thanks.

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.