Custom component - over riding on before data (or similar)

I am slowly making progress writing my own components - at least i can now create a basic decendant of TfrxMemoView, display it in my report and have it display the data (an integer) from the associated dataset and datafield

What i need to do now is manipulate the underlying data (a unix numeric time stamp) and display it as a formated string.

I have already got a custom function (UnixToString) that will do the conversion for me and this is listed in the functions tab of fastreport.

I am a bit stuck now (I am a C++ bod and don't speak delphi) as I see it I need to overide OnBeforePrint to call my custom function and display the correctly formatted string. But I havent got a clue how to do this is Delphi. Anybody care to give a very basic example of a custom component that overrides OBP or a similar event?

The goal I have at the end of this is that my customers can design their own reports and not have to worry about the format of the date, my component should take care of this for them.

All that said though, is there a better way to do this?

Comments

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.