CreateUniqueName

edited 8:09AM in FastReport 4.0
var
                                                                          
 Memo: TfrxMemoView;
                                                   
Procedure frxReport1OnStartReport(Sender: TfrxComponent);
var i:integer;                             
begin
                
  For i:=11 to  MasterData2.dataset.FieldsCount -1 do
    begin
     Memo := TfrxMemoView.Create(Header2);
     Memo.CreateUniqueName;
     Memo.Text := 'Hello FastReport!';
                   
    end;  
end;


I have a problem when I try to create Memo on Header2 band.
I get a message : Undeclared identifier CreateUniqueName
Why ?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 8:09AM
    first, the memo view must be created in the context of it's owner
    since you haven't created a variable of the band type and pointed it to the band, you have not created the memo
    and therefore cannot access its properties.

    second where are you trying to do this inside the report script or at the delphi level?

  • edited February 2009
    var
     head : TfrxHeader;                                          
     Memo: TfrxMemoView;
                                                 
            
       
    procedure frxReport1OnStartReport(Sender: TfrxComponent);
    var i:integer;                             
    begin
        head := Header1;                                   
            
      For i:=11 to  MasterData1.dataset.FieldsCount -1 do
        begin
         Memo := TfrxMemoView.Create(head);
         Memo.CreateUniqueName;
         Memo.Text := 'Hello FastReport!';
                                 
        end;  
    end;
    

    OK, now I have code like this.
    I added "head" variable, but CreateUniqueName is unknown again.
    I just want add few memos on header and Masterdata.
    I try to do this inside the report script.
    Can anyone help me ?
  • gordkgordk St.Catherines On. Canada.
    edited 8:09AM
    that is not a valid call inside the report., it is used when creating a report from code at the delphi level.

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.