Skip to content

TimeToString - cDRReport

Methods - Properties - Events

Method Type

Function

Return Type

String

Arguments

Argument Description
tmValue The time variable to format as string.

Description

Returns a formatted time value in the format hh:mm:ss. This can be used for parameters that require a time value.

Starting with version 5.0.1, the function is redirected to a child object based on the cDRReportHelper class.

DataFlex Framework Usage

  • Web
  • Windows
  • FlexTron

Sample

Object oReport is a cDRReport
    Set psReportName to 'MyReport.dr'
End_Object

Object oRunReportButton is a Button
    Set Label to 'Run Report'

    Procedure OnClick
        String sReportId sParameterValue
        Time tmNow
        Integer iParameter

        Get OpenReport of oReport to sReportId
        If (sReportId <> '') Begin
            Get ParameterIdByName Of oReport sReportId 'StartTime' to iParameter
            If (iParameter <> -1) Begin
                Move (CurrentDateTime ()) To tmNow
                Get TimeToString Of oReport tmNow To sParameterValue
                Set psParameterValue of oReport sReportId iParameter to sParameterValue
            End
            Send DisplayReport Of oReport
        End
    End_Procedure
End_Object