Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

OnDrawCommandClick not working ???

edited June 2005 in RAP
Hi,

I'm trying to use OnDrawCommandClick in RAP and it's not working. I tried to
use the Nard's myDrawCommandRTT.pas patch, but it doesn't work. It's
important that I use RAP, not Delphi. Here is my RAP code:
var

ppDrawCommand: TppDrawCommand;

begin

ppDrawCommand := TppDrawCommand(aDrawCommand);

if (ForEtoile.Value = '*') then

begin

PRODUCTFooterA.Visible := TRUE;

ROUTEFooter.Visible := FALSE;

ForEtoile.Color := clRed;

ppDrawCommand.RedrawPage := TRUE;

end;

end;

Comments

  • edited June 2005

    The OnDrawCommandClick event works correctly in my testing here.

    Place a MessageBeep call at the top of your event-handler, it should be
    firing.

    As a test I created a report with a shape in the header and a single label
    in the detail band. I implemented the Label.OnDrawCommandClick as follows:

    var
    lDrawCommand: TppDrawCommand;
    begin

    MessageBeep;

    lDrawCommand := TppDrawCommand(aDrawCommand);
    lDrawCommand.RedrawPage := True;

    Header.Visible := not Header.Visible;
    Shape1.Brush.Color := clRed;

    end;



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2005
    Did u put this event-handler in Delphi or RAP Calc Editor? My issue is
    occuring if I use the RAP Calc Editor... if I use Delphi event-handler, it
    works correctly...

    David


  • edited July 2005

    I coded the event-handler in RAP...



    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.