Keeping together with Stretched Bands

edited April 2004 in FastReport 2.xx VCL
Yo!

The "Height" variable used in the example called "Keep master-detail together" in the Demo project does not change if the bands are stretched and thus change height.

Here's how to break the example to make it clear what I mean.

1. Run the Reports Example (FRDemo.exe).
2. Select "Keep master-detail toghether" and click "Desiger".
3. Insert the field Addr1 from Customer top-aliged in the master, make it 60 wide.
4. Set "Stretched" property of the MasterData band to true (checked).
5. Save and click Preview.

Grouping is breaked and I suppose that is because the Height variable contains designtime height, not runtime height.

What to do when you have a group och master-dertail-subdetail with a lot of stretched bands?

Regards,

/Dany

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:55AM
    Dany
    There is a sample file in the files section of the fastreport Yahoo group
    it is a modified version of 44.frf and shows additional code required when you have stretching in more than 1 band.
    regards ;)
  • edited 11:55AM
    gordk!

    Thanks! I'm not going to claim that I understand it fully, because I don't. That's the main problem. I could work with [cury] but I suspect this approach requires that all master records do have at least one detail. Or at least that there is a detail footer. Especially when the Master Data band has a child, because it would have to be kept together with the child and that calculus would have to be performed in a non-existing detail for some bands. Pew.

    I will be needing keep-together functionality in a lot of reports that would benefit a lot from easy modifcation, even by users. I envision last minute changes that will easily break the keep-together routine.

    Is this not a recurring problem for FastReport users?

    Some built in property for this would be absolutely great! Something like Word "Keep toghether with next" though in FR it would be "Keep together with former band"... or something. Though I realize this approach is more flexible.

    If there was an OnAfterPrint it would be much simpler to implement this like it's done today? Don't you think?

    Regards,

    /Dany
  • gordkgordk St.Catherines On. Canada.
    edited 11:55AM
    Hi Dany
    I can tell you from beta testing fr3 a7, the events and properties your looking for have been added. Hopefully Alexander's work with the help files will soon be finished.
    regards ;)
  • edited 11:55AM
    Sound grate Gordk!

    /Dany

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.