Assertion Fail on OnFilePrintPreview |
Post Reply |
Author | |
XavierDev
Newbie Joined: 04 May 2010 Location: France Status: Offline Points: 5 |
Post Options
Thanks(0)
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |