Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Report grouping on datetime column

edited December 2010 in General
Hi,

This is using Delphi XE, RB 12.03, SQL Svr 2008 R2.

I have a column type of type datetime defined in a table with a data
dictionary entry specifying the type as 'dtDateTime'.

I notice in a report that groups on this column (grouped at the report
level, not in the data) that it does not take account of the
milliseconds in the values.

The problem is that the following datetime values are being grouped
together when they actually represent 2 distinct operations in terms of
viewing the audit trail, the first 2 are an amend on a table and the
other is a delete. This is an audit table where several records can be
added in very quick succession.

2010-12-07 14:47:46.020
2010-12-07 14:47:46.020
2010-12-07 14:47:46.033

Do you know if there's a workaround for this please?

--
Regards, Paul.

Comments

  • edited December 2010
    I researched this. Prior to running the report, override the Delphi
    FormatSettings for LongTimeFormat.

    FormatSettings.LongTimeFormat := 'h:mm:ss:z';


    The Group is calling DataPipeline.GetFieldAsString which calls the Delphi
    TDateTimeField.AsString method. The TDateTimeField class converts the
    DateTime value to a string using the Delphi FormaSettings.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2010
    Nard Moseley (Digital Metaphors) wrote:


    Hi Nard,

    Thanks for the info, it has fixed the issue.

    --
    Regards, Paul.
This discussion has been closed.