Abort printing from GlobalOnCreate
In the Global On Create event I popup a form to collect information (via a
pass through function). I offer a cancel button and would like to not print
(nor preview) in this case.
procedure GlobalOnCreate;
begin
if not ShowDataForm( RangeFrom, RangeTo) then
DoNotPrint;
end;
What command can I use for DoNotPrint?
TIA,
Scott.
pass through function). I offer a cancel button and would like to not print
(nor preview) in this case.
procedure GlobalOnCreate;
begin
if not ShowDataForm( RangeFrom, RangeTo) then
DoNotPrint;
end;
What command can I use for DoNotPrint?
TIA,
Scott.
This discussion has been closed.
Comments
RB 9 introduced a new Report.OnInitializeParameters event that can be used
to cancel a report (and to initialize parameters, show custom dialogs, etc).
The event-handler includes a boolean parameter, aCancel, that can be set to
true.
example:
procedure ReportOnInitializeParameters(var aCancel: Boolean);
begin
if not(some condition) then
aCancel := True;
end;
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com