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 4:46PM
    Try
    procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
    begin
         if Sender.Name = 'Subreport1' then
          Sender.Visible := False;
    end;
    
  • edited 4:46PM
    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