report link and winform

edited 10:30PM in FastReport 4.0
Hello,

I have a report and link as OnPreviewClick, I want to view a form and get sender value.
How to do this.

Thanks

Comments

  • gpigpi
    edited 10:30PM
    What form do you want to view? Attach a simple demo project with problem
  • edited 10:30PM
    nash wrote: »
    Hello,

    I have a report and link as OnPreviewClick, I want to view a form and get sender value.
    How to do this.

    Thanks


    Thanks for reply,
    I mean any winform within the application, for example when I click on drilldown memo field, I want to show a form (let we say form1) and change the form1.caption to sender???s text let we say memo1.text or so.
    Thank you
  • edited October 2010
    nash wrote: »


    Thanks for reply,
    I mean any winform within the application, for example when I click on drilldown memo field, I want to show a form (let we say form1) and change the form1.caption to sender???s text let we say memo1.text or so.
    Thank you


    here is what I mean.
    I have a report called report1 and has one Memo1 on it with text='This is a test'; and have click

    procedure Memo1OnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
    begin
    showmessage(memo1.text);
    end;

    and then I have Delphi form has frxReport1 which loads above report runtime

    procedure TMainForm.frxReport1ClickObject(Sender: TfrxView;
    Button: TMouseButton; Shift: TShiftState; var Modified: Boolean);
    begin
    //here is when I need, I need to show above Memo1.Text on this click.
    show clicked object value
    end;


    Thanks
  • gpigpi
    edited 10:30PM
    Try
    procedure TForm1.frxReport1ClickObject(Sender: TfrxView;
      Button: TMouseButton; Shift: TShiftState; var Modified: Boolean);
    begin
         if (Sender is TfrxMemoView) and (Sender.Name = 'Memo1') then
           ShowMessage(Trim(TfrxMemoView(Sender).Text));
    end;
    

Leave a Comment