Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - CXTPReportRecordItemDateTime locale
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportRecordItemDateTime locale

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportRecordItemDateTime locale
    Posted: 26 August 2008 at 8:46am
XTP 12.0.1.
When I create a CXTPReportRecordItemDateTime I expect its format to be the same as the result from COleDateTime::Format(void). Instead a strange formatting string is being used. Why?!
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2008 at 9:08am
Hi;
I hit the same just a few minutes ago. Must have something to do with CXTPReportControlLocale. But I can't figure out how to configure it to use the same as COleDateTime.Format().

So I decided to write my own DateTime item class:
CXRReportRecordItemDateTime::CXRReportRecordItemDateTime(const COleDateTime& dt)
: CXTPReportRecordItemDateTime(dt)
{
    SetFormatString(_T(""));
}

CString CXRReportRecordItemDateTime::GetCaption(CXTPReportColumn* /*pColumn*/)
{
    if (!m_strCaption.IsEmpty())
        return m_strCaption;

    if (m_odtValue.GetStatus()==COleDateTime::invalid)
        return _T("");
    else
        return m_odtValue.Format();
}

void CXRReportRecordItemDateTime::SetValue(const COleDateTime& dtDateTime)
{
    m_odtValue=dtDateTime;
}

Perhaps Oleg can show us how to adjust the CXTPReportControlLocale to get the same behaviour...
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2008 at 2:42pm
I've found most of the item-classes to be inadequate, so I tend to write my own no matter what :)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.