How To…Refresh the Report After a Drawcommand Click

Question

“How can I refresh/redraw the report after I click a “hot” component on my report?”

Solution

Inside the OnDrawCommandClick event of a report component, reset the report and report engine.  Then set the DrawCommand.RedrawPage property to True. This is very similar to the way the AutoSearch feature functions and can also be done with RAP code using a small passthru function.

Download:

RefreshReportAfterDataChange.zip
RefreshReportAfterDataChangeRAP.zip 

Sample Delphi code: