Windows with event onContentLoaded and Jasperreport

Good day:
I don’t know if you can advise me on my problem.
Inside an dhtmlXWindows object I add an event of type onContentLoaded and the method attachURL.
The url calls a action that generates a Jasperreport report. If I define the attachURL method as ajax, I run the event but it puts the report inside the window with bad coding. However if I define attachURL that loads it by iframe, it generates the report well but does not execute the event.
Is there a way to generate the report and run the event?
Thank you very much in advance.

In case of placing the iframe in the dhtmlxWindows cell it is not available to control the progress of the loading of that iframe content.