I would recommend converting your decimal number into a TDateTime type. From there you can alter the display format of the RB object to show the value exactly as you need.
That sounds ok, but I need to display it in hours and minutes, I am not able to show the days at all. Is this still possible if I convert it into time format?
e.g: 100:20 for a hundred hours and twenty mintues.
Internally ReportBuilder calls Delphi's FormatDateTime function to format TDateTime data. See the Delphi online help for the FormatDateTime for details.
I do not think there is a display format that will convert the days to hours, but you can easily write some code to do it. The Delphi DateUtils function contains a large collection of utility routines for date calculations.
To perform custom formatting there are a couple of approaches:
1. Use the DBText.OnFormat event
2. Create a custom TppDisplayFormat descendant class and register it with RB. All formatting in ReportBuilder utilitizes TppDisplayFormat which is defined in ppDisplayFormat.pas.
-- Nard Moseley Digital Metaphors www.digital-metaphors.com
Best regards,
Nard Moseley Digital Metaphors www.digital-metaphors.com
Comments
I would recommend converting your decimal number into a TDateTime type.
From there you can alter the display format of the RB object to show the
value exactly as you need.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
to show the days at all.
Is this still possible if I convert it into time format?
e.g: 100:20 for a hundred hours and twenty mintues.
Internally ReportBuilder calls Delphi's FormatDateTime function to format
TDateTime data. See the Delphi online help for the FormatDateTime for
details.
I do not think there is a display format that will convert the days to
hours, but you can easily write some code to do it. The Delphi DateUtils
function contains a large collection of utility routines for date
calculations.
To perform custom formatting there are a couple of approaches:
1. Use the DBText.OnFormat event
2. Create a custom TppDisplayFormat descendant class and register it with
RB. All formatting in ReportBuilder utilitizes TppDisplayFormat which is
defined in ppDisplayFormat.pas.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I will have a look and see how it goes.
Regards,
Jason