<?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 : [SOLVED] Markup and refreshing</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : [SOLVED] Markup and refreshing]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 19 May 2026 05:21:18 +0000</pubDate>
  <lastBuildDate>Tue, 16 Oct 2018 16:46:44 +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=22566</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[[SOLVED] Markup and refreshing : In some instances, we need to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=77085&amp;title=solved-markup-and-refreshing#77085</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=669">markr</a><br /><strong>Subject:</strong> 22566<br /><strong>Posted:</strong> 16 October 2018 at 4:46pm<br /><br />In some instances, we need to inject markup&nbsp;<span style=": rgb248, 248, 252;">through GetItemMetrics() because we don't know the dimensions of the rendered cell rectangle prior to that point. This may happen whether the control is using virtual mode or not.</span><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">In such cases, I find that the BestFit() method (or double clicking on a column divider to auto-size) no longer works correctly for such columns. It appears to be resizing according to the unparsed markup (rather than the rendered markup).</span></div><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">Is this a bug, or am I perhaps missing something? Any thoughts on a workaround?</span></div><div><span style=": rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">- Mark R.</span></div>]]>
   </description>
   <pubDate>Tue, 16 Oct 2018 16:46:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=77085&amp;title=solved-markup-and-refreshing#77085</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Markup and refreshing : Hello Aaron,Thank you for bringing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73190&amp;title=solved-markup-and-refreshing#73190</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 22566<br /><strong>Posted:</strong> 09 April 2015 at 10:11am<br /><br />Hello Aaron,<br><br>Thank you for bringing this to our attention. I have discovered that implementation of markup in ReportControl really wasn't finished.<br>I have fixed issues with refreshing of markup. The fix will be available in the next beta or final release.<br><br>Therefore, from next release:<br>1) CXTPReportControl::EnableMarkup() works at any moment correctly and refresh markup elements of recordItems, column's headers, groupRows, scrollBars. But developer must update content of ReportRecordItems to appropriate text with ReportRecordItems::SetCaption() anyway. Oterwise users will see unparsed xml.<br><br>2) diverse initialization order supported. For example: create recordItems &#091;markuped/plain captions can be setted there&#093;, create record and add items &#091;or there&#093;, add record to reportControl &#091;or there&#093;.<br><br>3) fixed: If ReportRecordItem has already markuped caption CXTPReportRecordItem::m_strCaption then there is no way to set markuped content through GetItemMetrics() and metrics-&gt;strText  when pPaintManager-&gt;m_bForceDynamicMarkupForCell is TRUE or VirtualMode turned on.<br><br>So markup content can be setted also through GetItemMetrics() and metrics-&gt;strText when pPaintManager-&gt;m_bForceDynamicMarkupForCell is TRUE or VirtualMode turned on.<br><br>Note that CXTPReportPaintManager::m_bForceDynamicMarkupForCell saves memory BUT this is expensive for processor because it forces creating and destroying temporary markup objects every time when  ReportRecordItems::OnDrawCaption() method. m_bForceDynamicMarkupForCell used as analog to virtual mode behaviour. Usual behaviour is creating markup objects only on SetCaption() or EnableMarkup(TRUE).<br><br>Regards,<br>   Oleksandr Lebed]]>
   </description>
   <pubDate>Thu, 09 Apr 2015 10:11:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73190&amp;title=solved-markup-and-refreshing#73190</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Markup and refreshing : Thanks for the replyOleksandr. ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73188&amp;title=solved-markup-and-refreshing#73188</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5402">Aaron Koolen</a><br /><strong>Subject:</strong> 22566<br /><strong>Posted:</strong> 06 April 2015 at 7:08pm<br /><br /><div>Thanks for the reply&nbsp;<span style="line-height: 16.7999992370605px;">Oleksandr.</span></div><div><span style="line-height: 16.7999992370605px;"><br></span></div><div><span style="line-height: 16.7999992370605px;"><br></span></div><div><br></div><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by olebed" alt="Originally posted by olebed" style="vertical-align: text-bottom;" /> <strong>olebed wrote:</strong><br /><br />Hello Aaron,<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron Koolen" alt="Originally posted by Aaron Koolen" style="vertical-align: text-bottom;" /> <strong>Aaron Koolen wrote:</strong><br /><br />I enable markup on the control with EnableMarkup() but I also found I needed to set m_bForceDynamicMarkupForCell in the paint manager otherwise I found that after calling Populate() I had to go through each record in the control and refresh it's contents with calls to SetCaption().</td></tr></table> I think showing unparsed markup in report cells it is very very special way of using ReportControl &nbsp;else if you don't want show xml you must update cells with readable captions anyway.<div></td></tr></table></div><div><br></div><div>Sorry if I wasn't clear. I don't want to show unparsed markup, but that's what I was getting until I called SetCaption() after a Populate(). So I can't even go AddRecord(record), record-&gt;SetCaption(xml). I have to add all the records, call Populate() and then iterate over all the records calling SetCaption().</div><div><br></div><div><span style="line-height: 16.7999992370605px;"><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by olebed" alt="Originally posted by olebed" style="vertical-align: text-bottom;" /> <strong>olebed wrote:</strong><br /><br /></span></div><div><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron Koolen" alt="Originally posted by Aaron Koolen" style="vertical-align: text-bottom;" /> <strong>Aaron Koolen wrote:</strong><br /><br />I have found that if I create an item for a record and give it initial text...</td></tr></table>&nbsp; What code do you use for this (also what version of toolkitPro) ? This behaviour really can be wrong.<br></td></tr></table></div><div><br></div><div>Here's some pseudocode.&nbsp;<span style="line-height: 1.4;">Inside my&nbsp;</span><span style="line-height: 16.7999992370605px;">MyDerived</span><span style="line-height: 16.7999992370605px;">RuleRecord&nbsp;</span><span style="line-height: 1.4;">constructor I go</span></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div><span ="Apple-tab-span" style="white-space:pre">	</span>m_filterItem = new&nbsp;<span style="line-height: 16.7999992370605px;">CXTPReportRecordItemText(SomeFunctionToGet</span>GetXML(), true);</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>AddItem(m_filterItem);</div></div><div></pre></td></tr></table></div><div><br></div><div>and in my derived report control I have</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div><span ="Apple-tab-span" style="white-space:pre">	</span>MyDerivedRuleRecord *newRecord = new&nbsp;<span style="line-height: 16.7999992370605px;">MyDerived</span><span style="line-height: 16.7999992370605px;">RuleRecord</span><span style="line-height: 1.4;">();</span></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>AddRecordEx(newRecord);</div></div><div></pre></td></tr></table></div><div><br></div><div><span style="line-height: 16.7999992370605px;"><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by olebed" alt="Originally posted by olebed" style="vertical-align: text-bottom;" /> <strong>olebed wrote:</strong><br /><br /></span><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron Koolen" alt="Originally posted by Aaron Koolen" style="vertical-align: text-bottom;" /> <strong>Aaron Koolen wrote:</strong><br /><br />If I dynamically update an item of a record, then the scroll bars to not adjust. If the item made the cell larger then the bottom of the report control is cut off. I have to call AdjustScrollBars() to get it to work.</td></tr></table> I think it is normal behaviour because ReportControl doesn't know exactly how many  items do you want to update this time. It is so expensive to call AdjustScrollBars() for every item  if you update 100 and more recordItems at once.<br></td></tr></table></div><div><br></div><div>Maybe it would be good to have this work within a BeginUpdate()/EndUpdate() system. That way you could transactionalise it or if you didn' bother, the updating would happen automatically. &nbsp;We're using 16.3.1.</div><div><br></div><div>I think overall, if there was actual documentation on using CodeJock and not just a reference manual, many many hours of developer time could have been saved as we tend to have to go looking around source code and scouring interfaces and example code to find out the way CodeJock wants us to do things.</div><div><br></div><div>Thanks</div><div>Aaron</div>]]>
   </description>
   <pubDate>Mon, 06 Apr 2015 19:08:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73188&amp;title=solved-markup-and-refreshing#73188</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Markup and refreshing : Hello Aaron,  Aaron Koolen wrote:I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73186&amp;title=solved-markup-and-refreshing#73186</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8730">olebed</a><br /><strong>Subject:</strong> 22566<br /><strong>Posted:</strong> 04 April 2015 at 10:26am<br /><br />Hello Aaron,<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron Koolen" alt="Originally posted by Aaron Koolen" style="vertical-align: text-bottom;" /> <strong>Aaron Koolen wrote:</strong><br /><br />I enable markup on the control with EnableMarkup() but I also found I needed to set m_bForceDynamicMarkupForCell in the paint manager otherwise I found that after calling Populate() I had to go through each record in the control and refresh it's contents with calls to SetCaption().</td></tr></table> I think showing unparsed markup in report cells it is very very special way of using ReportControl &nbsp;else if you don't want show xml you must update cells with readable captions anyway.<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron Koolen" alt="Originally posted by Aaron Koolen" style="vertical-align: text-bottom;" /> <strong>Aaron Koolen wrote:</strong><br /><br />I have found that if I create an item for a record and give it initial text...</td></tr></table>&nbsp; What code do you use for this (also what version of toolkitPro) ? This behaviour really can be wrong.<br><br><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Aaron Koolen" alt="Originally posted by Aaron Koolen" style="vertical-align: text-bottom;" /> <strong>Aaron Koolen wrote:</strong><br /><br />If I dynamically update an item of a record, then the scroll bars to not adjust. If the item made the cell larger then the bottom of the report control is cut off. I have to call AdjustScrollBars() to get it to work.</td></tr></table> I think it is normal behaviour because ReportControl doesn't know exactly how many  items do you want to update this time. It is so expensive to call AdjustScrollBars() for every item  if you update 100 and more recordItems at once.<br><br>Thank you.<br>Regards,<br>&nbsp; Oleksandr Lebed]]>
   </description>
   <pubDate>Sat, 04 Apr 2015 10:26:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73186&amp;title=solved-markup-and-refreshing#73186</guid>
  </item> 
  <item>
   <title><![CDATA[[SOLVED] Markup and refreshing : Hi all. I have a report control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73176&amp;title=solved-markup-and-refreshing#73176</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5402">Aaron Koolen</a><br /><strong>Subject:</strong> 22566<br /><strong>Posted:</strong> 29 March 2015 at 10:44pm<br /><br />Hi all. I have a report control with markup enabled. There seems to be a few things I must be missing to get the control to update and display properly so I hope someone can help.<div><br></div><div>I enable markup on the control with EnableMarkup() but I also found I needed to set m_bForceDynamicMarkupForCell in the paint manager otherwise I found that after calling Populate() I had to go through each record in the control and refresh it's contents with calls to SetCaption().</div><div><br></div><div>I have found that if I create an item for a record and give it initial text, then the size of the cell is not calculated due to the markup, but to the contents, unparsed. So the cells end up larger than they should be. If I refresh the items manually (As above) then it recalculates.</div><div><br></div><div>If I dynamically update an item of a record, then the scroll bars to not adjust. If the item made the cell larger then the bottom of the report control is cut off. I have to call AdjustScrollBars() to get it to work.</div><div><br></div><div>All in all it seems that markup in report controls are not particularly dynamic and in some cases quite bugged. I would have expected to have just had to set the EnableMarkup(TRUE) on the control, set the markup when either creating the items with AddItem or changing them with SetCaption and have everything adjust correctly. It certainly doesn't seem to work that way.</div><div><br></div><div>Is there some documented set of steps to create and update markup items?</div><div><br></div><div>Thanks</div><div>Aaron</div>]]>
   </description>
   <pubDate>Sun, 29 Mar 2015 22:44:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22566&amp;PID=73176&amp;title=solved-markup-and-refreshing#73176</guid>
  </item> 
 </channel>
</rss>