Can we access from's control

edited 11:41PM in FastReport 4.0
I wrote a custom control for fast report and wanna bind it with control placed on Delphi's Form, is it possible? Can I access Form's control in fast report designer?
thanks in advance.

Regards
MS Pathan

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 11:41PM
    you can at runtime
    sample delphi form code
    procedure TForm1.Button4Click(Sender: TObject);
    begin
    frxreport3.Clear;
    frxreport3.OnBeforePrint := nil;// disconnect unwanted events
    frxreport3.OnAfterPrint := nil;
    frxreport3.LoadFromFile(wpath+'vartest4.fr3');// load your file
    frxReport3.Variables.Clear;//clear list
    frxreport3.script.AddForm(self);// add the current delphi form

    if cb1.checked then
    frxreport3.designreport else frxreport3.showreport;
    end;


    report code
    var
    mpath:string;
    begin
    mpath := form1.label1.caption;// get value from delphi form

    end.
    you can access properties of objects on the delphi form but you must know they exist
    and you cannot access form variables.

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.