Altering Objects

khhkhh
edited 8:57PM in FastReport 3.0
I have a MemoView its name 'SAF'. I want to alter it only.

1- What wrong with this code it seems to has no effect?!
2- How to change Engine.CurX of one band only?

procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin

if Sender.Name ='SAF' then SAF.left := SAF.left - SAF.width;

end;

Comments

  • edited 8:57PM
    wrote:
    1- What wrong with this code it seems to has no effect?!

    In MasterData1OnBeforePrint(Sender: TfrxComponent) event - sender can be only MasterData1.
    In SAFOnBeforePrint(Sender: TfrxComponent) event - sender can be only SAF.
    wrote:
    I have a MemoView its name 'SAF'. I want to alter it only.
    Try so:
    procedure SAFOnBeforePrint(Sender: TfrxComponent);
    begin
    SAF.left := SAF.left - SAF.width;
    end;
    
    wrote:
    2- How to change Engine.CurX of one band only?
    //--------Global varibles----                                                           
    var
     b1:integer;
     EngCurX:Extended;
    
    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
    begin
     if b1=0 then    
      begin
      EngCurX:=Engine.CurX;
      Engine.CurX := Engine.CurX + 50;
      b1:=1;
      end
     else
      if b1=1 then//restore position                                                                                     
      begin
      Engine.CurX:=EngCurX;
      b1:=3;//Don't call restore another                                                                                 
      end;
    end;
    
    //----main function-------                                                     
    begin
    b1:=0;
    end.
    
  • khhkhh
    edited 8:57PM
    Thank you Den

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.