Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - [solved] empty ReportRecordItemPreview
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] empty ReportRecordItemPreview

 Post Reply Post Reply
Author
Message
sbinder View Drop Down
Groupie
Groupie
Avatar

Joined: 22 November 2004
Location: Austria
Status: Offline
Points: 69
Post Options Post Options   Thanks (1) Thanks(1)   Quote sbinder Quote  Post ReplyReply Direct Link To This Post Topic: [solved] empty ReportRecordItemPreview
    Posted: 07 June 2018 at 7:08am
The Preview-Modus in ReportControl does not work since 18.4.0!
See ReportSample


Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 811
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2018 at 10:13am
Hello,

Please describe your environment,  library configuration (Unicode, Static, Dynamic, x86, x64, ...)

Regards,
 Oleksandr Lebed
Back to Top
sbinder View Drop Down
Groupie
Groupie
Avatar

Joined: 22 November 2004
Location: Austria
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote sbinder Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2018 at 7:10am
Dynamic x86
Back to Top
olebed View Drop Down
Admin Group
Admin Group
Avatar

Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 811
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2018 at 6:19am
Hello,

Sorry I have confused ReportRecordItemPreview with PrintPreview where we have made some improvements.

So I found reason of empty ReportRecordItemPreview. Bug in method CXTPReportRecordItemPreview::OnDrawCaption() and the same copy-past bug in GetCaptionRect() method 
void CXTPReportRecordItemPreview::GetCaptionRect(XTP_REPORTRECORDITEM_ARGS* pDrawArgs, CRect& rcItem)
{
    ASSERT(NULL != pDrawArgs);
    ASSERT(NULL != pDrawArgs->pControl);

    if (NULL == pDrawArgs->pControl)
        return;

    CRect& rcIndent = pDrawArgs->pControl->GetPaintManager()->m_rcPreviewIndent;
    rcItem.DeflateRect(rcIndent.left - XTP_DPI_X(2), -XTP_DPI_Y(1), rcIndent.right, -rcIndent.bottom);
}

void CXTPReportRecordItemPreview::OnDrawCaption(
    XTP_REPORTRECORDITEM_DRAWARGS *pDrawArgs,
    XTP_REPORTRECORDITEM_METRICS  *pMetrics)
{
    ASSERT(NULL != pDrawArgs);
    ASSERT(NULL != pDrawArgs->pControl);

    if (NULL == pDrawArgs->pControl)
        return;
......
Regards,
 Oleksandr Lebed
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.