Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Bug: Print Selected fails
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug: Print Selected fails

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

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Topic: Bug: Print Selected fails
    Posted: 07 August 2012 at 8:17pm
With Selected radio button set in the Print dialog the selection is ignored and the entire document prints anyhow.

During trace in OnPreparePrinting:

There ARE selected rows.
m_bPrintSelection is TRUE.

BOOL CXTPReportView::OnPreparePrinting(CPrintInfo* pInfo)
{
    if (GetReportCtrl().IsIconView())
    {
        GetReportCtrl().SetIconView(FALSE);
        m_bSwitchMode = TRUE;
    }

    m_bShowRowNumber = GetReportCtrl().IsShowRowNumber();
    GetReportCtrl().ShowRowNumber(FALSE);

    if (GetReportCtrl().GetSelectedRows()->GetCount() > 0)
        pInfo->m_pPD->m_pd.Flags &= ~PD_NOSELECTION;

    pInfo->m_bDirect = m_bPrintDirect;

    // default preparation
    if (!DoPreparePrinting(pInfo))
        return FALSE;

    m_bPrintSelection = pInfo->m_pPD->PrintSelection();

    return TRUE;
}

This is reproducible in the ReportSample.

Any chance this can be fixed? Thanks!

Static unicode build.
Toolkit version 15.3.1
Visual Studio 10.0
Win 7 X 64 professional.

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.156 seconds.