<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Assertion Fail on OnFilePrintPreview</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Assertion Fail on OnFilePrintPreview]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 00:06:49 +0000</pubDate>
  <lastBuildDate>Tue, 04 May 2010 09:47:43 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=16660</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Assertion Fail on OnFilePrintPreview : I have builda simple MFC SDI projectwith...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16660&amp;PID=58315&amp;title=assertion-fail-on-onfileprintpreview#58315</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6080">XavierDev</a><br /><strong>Subject:</strong> 16660<br /><strong>Posted:</strong> 04 May 2010 at 9:47am<br /><br />I have build&nbsp;a simple MFC SDI project&nbsp;with View derived from <FONT size=2>CXTPReportView, and I get an assertion fail everytime the PrintPreview is called:<DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2></FONT></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> CXTPReportView::_OnPrint2(CDC* pDC, CPrintInfo* pInfo, CRect rcPrint)</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (!m_pPrintOptions || !pDC || !pInfo)</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT size=2>ASSERT(FALSE);</FONT></DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2>;</FONT></DIV><DIV><FONT size=2>}</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>UINT nPage = pInfo-&gt;m_nCurPage;</FONT></DIV><DIV><FONT size=2>---&gt;&nbsp;&nbsp;&nbsp;&nbsp; ASSERT(nPage &lt;= (UINT)m_aPageStart.GetSize());&nbsp; // Where app crashes!! nPage=1 and m_aPageStart.GetSize() = 0</FONT></DIV><DIV><FONT size=2>UINT nIndex = m_aPageStart&#091;nPage-1&#093;;</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><FONT size=2>I have bound&nbsp;this simple CView derived from CXTPReportView in the codejock sample ReportSample and it works, the PrintPreview shows up !! What&nbsp;am I&nbsp;missing?</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Thank in advance.</FONT><FONT size=2><FONT size=2></DIV></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Tue, 04 May 2010 09:47:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16660&amp;PID=58315&amp;title=assertion-fail-on-onfileprintpreview#58315</guid>
  </item> 
 </channel>
</rss>