How to call report from dialog command button?

How to call report from dialog command button?

Hi,

For example,on button clicked method

reportRun report;

;

report = new ReportRun(new Args(ReportStr(youReport)));

report.args().parm(yourParm);

report.printJobSettings().setTarget(PrintMedium::screen);//print to sscreen

report.run();

Hope it helps

Regards,

Thomas

let suppose there is BOE and from there i went to lines menuitem button and then settlement and then function and then generate payment and the method of payment will be Bill of exchange and dialog will appear after clicking ok the report should generate

how can i do that?

where should i write this code

in report or salesquotation class