Abort Running A Report Without Closing Request Form

Jonathan2708Jonathan2708 Member Posts: 552
Hi,

I have a ProcessingOnly report with options on a request form. I want to validate the options the user fills in before running the report and if a text box has been left blank then warn the user but allow them to correct it without having to rerun the report object.

I'ven been experimenting with ERROR() and CurrReport.QUIT(), CurrReport.BREAK() but the report always seems to close completely.

Any help appreciated,

Jonathan

Comments

  • Yaroslav_GaponovYaroslav_Gaponov Member Posts: 158
    Hi,

    The request form have an OnQueryCloseForm trigger as well - Just I think to add in it some test.

    PS No, this dosn't work ](*,)
  • Jonathan2708Jonathan2708 Member Posts: 552
    Yeah I already tried OnCloseQueryForm().

    By the way, it's not just checking if a field is blank, I also need to compare the values entered before allowing the report to process. (In case anybody was going to suggest using the NotBlank property).

    I know I could have a form calling the report, but I'd rather keep it all in one object.

    Jonathan
  • Revolution1210Revolution1210 Member Posts: 161
    Unfortunately, any dialog which you force, either using ERROR, MESSAGE etc. placed on a report trigger will subsequently cause the report to exit.

    You could perform validation OnValidate of the controls on your request form, or design your request form in such a way that the user must enter the options correctly

    ...or just consign yourself to the fact that they will have to run the report again if they receive an error - no great shakes really :D
    Ian

    www.NextEqualZero.com
    A technical eye on Dynamics NAV
  • krikikriki Member, Moderator Posts: 9,086
    Or create a form that takes the parameters, checks if all is ok and then runs the report.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.