axapta - Get dialog result of SSRS parameter form -


from report controller object, i'm trying figure out how find out if user has canceled ssrs report dialog screen or if hit ok.

in ax, i'm trying write controller execute 2 different designs of same report object, both use same contract (parameters). far have code:

cuscontroller controller; cuscontract   contract;  //run format 1 controller = new cuscontroller(); controller.initcontroller(_args); controller.parmreportname(ssrsreportstr(cusreport, format1)); controller.parmshowdialog(true); controller.startoperation();  //run format 2 contract = controller.parmreportcontract().parmrdpcontract() cuscontract; contract.parmformat(cusreportformat::format2); controller = new cuscontroller();  controller.initcontroller(_args); controller.parmreportname(ssrsreportstr(cusreport, format2)); controller.parmshowdialog(false); controller.parmreportcontract().parmrdpcontract(contract); controller.startoperation(); 

the above works perfect when user enters in parameters , hits ok. however, when user hits cancel first report cancels, since second report has parmshowdialog(false), doesn't know first report canceled. ideas on how capture cancel first report?

depending on controller class extends, think this. i've seen done ton of different ways:

    sysoperationstartresult         result;      // method 1     result = controller.startoperation();     if (result == sysoperationstartresult::started ||         result == sysoperationstartresult::addedtobatchqueue)     {         info("they clicked ok");     }      // method 2     if (controller.prompt())     {         controller.run();         info("they clicked ok");     } 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -