Options

Processing only report return value

poverocanepoverocane Member Posts: 32
Hi all and thanks in advance...
Is it possible to retrieve the return value from a processing-only report?

That is, is it possible to know if the user push the "OK" button or the "Cancel" button after report running?

Hope being clear...

Thanks...

poverocane
Fantasy is more important than knowledge.
A. Einstein

Comments

  • Options
    g_dreyerg_dreyer Member Posts: 123
    Hi poverocane,

    Here is an option for you:

    Create a log table with:
    User (code20),
    Date Run (datetime),
    Report No (integer),
    Result Value (up to you),
    OK (boolean)

    You should write to the log table on two triggers:
    F9 on on a blank line in the dataitem view of the report in order to find the triggers "Report - OnInitReport()" and "Report - OnPostReport()"

    OnInitReport:
    Insert a new line, filling in the user,date,report no and leave OK as false

    OnPostReport:
    Modify the same line, set your result value and set OK as true.
    If the report runs up to OnPostReport, it must mean that the user have hit OK. Be carefull though, if your report hits an error during processing, it will look as if the user never clicked OK.

    I'm sure some of the others will come up with more elegant solutions.

    Hope this helps,
    Gustav
  • Options
    poverocanepoverocane Member Posts: 32
    Thanks a lot, Gustav...
    Yours is a very intelligent solution...

    poverocane
    Fantasy is more important than knowledge.
    A. Einstein
Sign In or Register to comment.