report link and winform

edited 2:26PM 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 2:26PM
    What form do you want to view? Attach a simple demo project with problem
  • edited 2:26PM
    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: »
    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


    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 2:26PM
    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

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.