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?
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