Options

Quit or Exit report OnPreReport

colingbradleycolingbradley Member Posts: 162
I need to get the user to agree to continue before they are asked to complete the options.

Confirmed := CONFIRM(Text20000,FALSE);
IF NOT Confirmed THEN
CurrReport.QUIT;

This only works if used in the OnPreDataItem after they have completed the Option requirements.

I have tried using Report - OnPreReport() but it still only asks after the options have been completed.
This will irritate the user so is there another way to do this?

:?
Experience is what you get when you hoped to get money

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    What about this code in the OnInitReport-trigger:
    Confirmed := CONFIRM(Text20000,FALSE);
    IF NOT Confirmed THEN
      ERROR('Report aborted');
    
    Will this also irritate the user?
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    colingbradleycolingbradley Member Posts: 162
    That will do nicely, thanks.
    Bit abrupt but they will get the idea.
    :)
    Experience is what you get when you hoped to get money
  • Options
    KishormKishorm Member Posts: 921
    You could always do an ERROR('') if you don't want to show an error message when they click on No. :-)
Sign In or Register to comment.