Is there a Client Side Event that triggers when the report finish rendering?
Hi Guys,
I am using FastReport.NET in MVC.
I am displaying the report like this
Is there a client-side(JavaScript) event that triggers when the report finishes rendering?
If so, how to call it?
Regards,
Naveen
I am using FastReport.NET in MVC.
I am displaying the report like this
@ViewBag.WebReport.GetHtml()
Is there a client-side(JavaScript) event that triggers when the report finishes rendering?
If so, how to call it?
Regards,
Naveen
Comments
Disclaimer. This is super hacky, your mileage may vary, and you'll have to be careful when updating fast-report.
Anyway. My method involves hijacking one of the script functions that fast-report generates. If you crack open your browser console and look at the javascript files you should find one called webresource.axd.
In here is a function called frReplaceInnerHTML() which appears to be called when fastreport needs to update the page.
Its currently defined as:
So effectively what I did was create a new frReplaceInnerHTML() function with a call to my own code before the final line return newObj;
To clarify, I dropped the above function into a javascript file that gets retrieved AFTER the original fast-report script loads.
So yeah, hope this helps.