Merge Celluls in FR3

KelloucheKellouche Algeria
edited May 2011 in FastReport 3.0
Hi

i would like realise a universel function for merging celluls, i have foud a part of code in FR4 forum, i have modified the code like this :
procedure MasterData3OnBeforePrint(Sender: TfrxComponent);
begin
  with Shape125.Frame do
    if LastUnite <> <FIBQ_Caract_Techniques."NOM_UNITE">
    then Typ := ftTop + ftLeft
    else Typ := ftLeft;
  LastUnite := <FIBQ_Caract_Techniques."NOM_UNITE">;
end;

but the celluls were not merged ! someone has an idea ?

Edit : in the original code, the merge has effect on field's frame so i would like merge the shape's frame.

Comments

  • KelloucheKellouche Algeria
    edited 7:13PM
    Kellouche wrote: »
    Hi

    i would like realise a universel function for merging celluls, i have foud a part of code in FR4 forum, i have modified the code like this :
    procedure MasterData3OnBeforePrint(Sender: TfrxComponent);
    begin
      with Shape125.Frame do
        if LastUnite <> <FIBQ_Caract_Techniques."NOM_UNITE">
        then Typ := ftTop + ftLeft
        else Typ := ftLeft;
      LastUnite := <FIBQ_Caract_Techniques."NOM_UNITE">;
    end;
    

    but the celluls were not merged ! someone has an idea ?

    Edit : in the original code, the merge has effect on field's frame so i would like merge the shape's frame.

    I think "typ" has not efect on a shape ! does this a bug ?
  • edited 7:13PM
    Shape.Frame.LeftLine seems to be what you need instead of Frame.Typ.
    But it doesn't work in FR4 as well. The same is when you try tu set DropShadow of Shape.
    Yes, really it seems to be a bug.

    Change you Shape for 4 separated lines and make them Visible or not according to your need.

    Mick
  • KelloucheKellouche Algeria
    edited 7:13PM
    Mick.pl wrote: »
    Shape.Frame.LeftLine seems to be what you need instead of Frame.Typ.
    But it doesn't work in FR4 as well. The same is when you try tu set DropShadow of Shape.
    Yes, really it seems to be a bug.

    Change you Shape for 4 separated lines and make them Visible or not according to your need.

    Mick

    is this a unique solution because i have a lot of reports with cells to be merged >
  • edited 7:13PM
    Sorry to say - I know no other solution for manipulating Shapes [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Consider what will mean less work to you:[/img]1. change shapes to TfrxMemoView and get full control of TfrxMemoView.Frame

    2. create universal procedure which will receive Shape as parameter and
    a. will hide this Shape (Visible := false)
    b. will replace this Shape with 2-3 lines (left, bottom, etc) according to your need laying this lines in the same place as Shape.

    3. create universal procedure which will receive Shape as parameter and
    a. will hide this Shape (Visible := false)
    b. will create a TfrxMemoView on-fly and will lay it down in the same place (Left,Top,...) as the Shape param and will set this memo Send Back
    c. will operate on that MemoFrame.


    Mick
  • KelloucheKellouche Algeria
    edited 7:13PM
    Thanks Mick

    okay, I'll do as you suggest, with some light modifications.
  • james cameronjames cameron San Francisco
    edited 7:13PM
    Mike your suggestion is nice for me and for every one thanks too & i will try it letter.

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.