In my scenario I initially created a form and after clicking the OK button in the specific form , a dialog opens shown in the below screenshot and after clicking OK button in the dialog a report get generated.But in my Case i just want to display the report after clicking OK button in my specific Form.
Coding ledgerjournalcontroller for displaying dialog.
if(controller.prompt())
{
controller.run();
}