How to set invisible subreport (dynamic)

Hello,

How to set subreport invisibile during the execution of an application.

OnBeforePrint

I can't intercept

if view.name='SubReport1' Then ...

Thank you
Olivier

Comments

  • gpigpi
    edited 9:46AM
    Try
    procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
    begin
         if Sender.Name = 'Subreport1' then
          Sender.Visible := False;
    end;
    
  • edited 9:46AM
    When i post a point break line 2 the debugger never stop on this line
    so i think subreport can't to be detected by event"onbeforeprint".
    I'm looking for another solution.

    1: If Sender.Name = 'SubReport6' then
    2: Sender.Visible := Display[1][1] = 'X'

    Thank you
    olivier
  • edited January 2011
    It's Ok I haven't seen the lowerrcase 'r' Subreport6 and not subReport6 like in fastreport 2.5

    Now

    If SameText(Sender.Name,'SubReport6') then
    Sender.Visible := Display[1][1] ='X';

    Thank you

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.