How To..Clickable DrawCommand with Custom Info

Question

“How can I associate custom info with a hot-clickable component on my report?”

Solution

This example creates a TmyCustomInfo class that stores the CustNo and Country for a customer. The DBText OnDrawCommandCreate event is used to associate an instance of TMyCustInfo with each DrawCommand generated for the page. The DBText OnDrawCommandClick event shows how to access the CustomInfo.

Download: DrawCommandCustInfo.zip

Sample Delphi code: