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

OnNoData

edited August 2002 in General
Are There any Exemplo how can I Use the onNOdata event using the
messageOnPage.

Thank's
Edson

Comments

  • edited August 2002
    Set Report.NoDataBehaviors to ndMessageOnPage.

    From the RBuilder.hlp file:

    If the MessageOnPage option has been selected, then the draw text command
    which will be added to the output page is passed via the aDrawCommand
    parameter (otherwise this parameter is nil.) You can prevent the draw
    command from being added to the output page by setting aAddDrawCommand to
    False. Doing so causes the draw command to be freed by the engine. In order
    to get access to the draw command properties, add ppDrwCmd to the uses
    clause, and typecast this parameter as TppDrawText. You can then set the
    value and position of the text, as in:

    lDrawText := TppDrawText(aDrawCommand);
    lDrawText.TextAlignment := taCentered; lDrawText.Text := 'No orders for ' +
    Table1.FieldByName('Company').AsString; lDrawText.Left := 0; lDrawText.Width
    := ppReport1.PrinterSetup.PageDef.mmPrintableWidth;



    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.