Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Assertion Fail on OnFilePrintPreview
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Assertion Fail on OnFilePrintPreview

 Post Reply Post Reply
Author
Message
XavierDev View Drop Down
Newbie
Newbie
Avatar

Joined: 04 May 2010
Location: France
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote XavierDev Quote  Post ReplyReply Direct Link To This Post Topic: Assertion Fail on OnFilePrintPreview
    Posted: 04 May 2010 at 9:47am
I have build a simple MFC SDI project with View derived from CXTPReportView, and I get an assertion fail everytime the PrintPreview is called:
 
void CXTPReportView::_OnPrint2(CDC* pDC, CPrintInfo* pInfo, CRect rcPrint)
{
if (!m_pPrintOptions || !pDC || !pInfo)
{
ASSERT(FALSE);
return;
}
 
UINT nPage = pInfo->m_nCurPage;
--->     ASSERT(nPage <= (UINT)m_aPageStart.GetSize());  // Where app crashes!! nPage=1 and m_aPageStart.GetSize() = 0
UINT nIndex = m_aPageStart[nPage-1];
 
 
I have bound this simple CView derived from CXTPReportView in the codejock sample ReportSample and it works, the PrintPreview shows up !! What am I missing?
 
Thank in advance.
VS2008 SP1
XTP 12.0.0
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.141 seconds.