<?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 : Serialize Reportcontrol state to file?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Serialize Reportcontrol state to file?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 20:28:21 +0000</pubDate>
  <lastBuildDate>Tue, 25 Aug 2009 05:31:32 +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=14864</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[Serialize Reportcontrol state to file? : Hi,  Use px.GetXML() string...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=52355&amp;title=serialize-reportcontrol-state-to-file#52355</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 25 August 2009 at 5:31am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Use px.GetXML() string to get Node as string.</DIV>]]>
   </description>
   <pubDate>Tue, 25 Aug 2009 05:31:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=52355&amp;title=serialize-reportcontrol-state-to-file#52355</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : You can use different ways: e.g....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=52331&amp;title=serialize-reportcontrol-state-to-file#52331</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 24 August 2009 at 12:34am<br /><br />You can use different ways: e.g. <DIV>derive your own MyPropExchangeXMLNode&nbsp; from CXTPPropExchangeXMLNode,</DIV><DIV>or</DIV><DIV>use CXTPPropExchangeXMLNode and call SaveToFile with&nbsp;temp_file_name generated by Windows API and writable under any user restriction, read generated file to your string and after delete this temporary file....</DIV><DIV>or</DIV><DIV>use prev idea but with memory file(?)</DIV><DIV>or ask Oleg to extend base class CXTPPropExchangeXMLNode</DIV><DIV><FONT color=#0000cc>or try to use this advice from </FONT><a href="http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2004-08/1568.html" target="_blank">http://www.tech-archive.net/Archive/VC/microsoft.public.vc.mfc/2004-08/1568.html</A>&nbsp;:</DIV><DIV><FONT color=#0000cc><EM>&gt; The save method in IXMLDOMDocument is defined in MSDN as: <BR>&gt; </EM><BR><EM ="quotelev1">&gt; HRESULT save(VARIANT destination); </EM><BR><EM ="quotelev1">&gt; </EM><BR><EM ="quotelev1">&gt; destination &#091;in&#093; : The type of object to save. This object can represent a&nbsp;</EM><EM ="quotelev1">file name, an ASP Response object, an XML document object, or a custom </EM><BR><EM ="quotelev1">&gt; object that supports persistence. See Remarks for more information. </EM><BR><EM ="quotelev1">&gt; </EM><BR><EM ="quotelev1">&gt; Remarks: </EM><BR><EM ="quotelev1">&gt; Any other custom COM object that supports QueryInterface for IStream,</EM><EM ="quotelev1"> IPersistStream, or IPersistStreamInit can also be provided here, and the </EM><BR><EM ="quotelev1">&gt; document will be saved accordingly. In the IStream case, the IStream Write&nbsp;</EM><EM ="quotelev1">method will be called as it saves the document; in the IPersistStream </EM>case, <BR><EM ="quotelev1">&gt; IPersistStream Load will be called with an IStream that supports the Read, </EM><BR><EM ="quotelev1">&gt; Seek, and Stat methods. </EM><BR><EM ="quotelev1">&gt; </EM><BR><EM ="quotelev1">&gt; If I want to save the XML document to memory, how should I proceed? What&nbsp;</EM><EM ="quotelev1">value should be assigned to destination?&nbsp;</EM><BR><EM ="quotelev1"></EM><BR>Create a COM object that implements the IStream interface. When you call IXMLDOMDocument::save, put your object's IUnknown pointer into the VARIANT's punkVal member. In your COM object, you must implement the methods of the IStream interface. When your Write method is called, you can do anything you want with the bytes that are passed to it, including stuffing them into a memory buffer. <BR></FONT></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 24 Aug 2009 00:34:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=52331&amp;title=serialize-reportcontrol-state-to-file#52331</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : Hi! I found that the CXTPPropExchangeXMLNode...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=52320&amp;title=serialize-reportcontrol-state-to-file#52320</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4876">unknow</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 23 August 2009 at 11:45am<br /><br />Hi! I found that the CXTPPropExchangeXMLNode class provides LoadFromFile and SaveToFile features; <DIV>&nbsp;</DIV><DIV>It also provides a LoadFromString feature, but NO "SaveToString" ??</DIV><DIV>&nbsp;</DIV><DIV>I would like to serialize the ReportControl state in XML format as part of my document, so it would be much easier for me to load/save from a CString.</DIV><DIV>&nbsp;</DIV><DIV>How can I save the reportstate to a CString ?</DIV>]]>
   </description>
   <pubDate>Sun, 23 Aug 2009 11:45:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=52320&amp;title=serialize-reportcontrol-state-to-file#52320</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : I think you can - may be with...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51870&amp;title=serialize-reportcontrol-state-to-file#51870</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 11 August 2009 at 3:24pm<br /><br />I think you can - may be with small modifications. ]]>
   </description>
   <pubDate>Tue, 11 Aug 2009 15:24:17 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51870&amp;title=serialize-reportcontrol-state-to-file#51870</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : Thanks for your reply and sorry...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51868&amp;title=serialize-reportcontrol-state-to-file#51868</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4876">unknow</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 11 August 2009 at 3:14pm<br /><br /><P>Thanks for your reply and sorry if I'm a bit "slow" but can I just use the code provided in the <EM>CReportSampleView::LoadReportState + CReportSampleView::SaveReportState </EM>and read/write from an already opened file in text mode ?</P><DIV>The idea would be to call this code from the document serialize routine;</DIV>]]>
   </description>
   <pubDate>Tue, 11 Aug 2009 15:14:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51868&amp;title=serialize-reportcontrol-state-to-file#51868</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : Sure - void LoadReportState();...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51842&amp;title=serialize-reportcontrol-state-to-file#51842</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 10 August 2009 at 6:46pm<br /><br />Sure - <FONT color=#0000ff size=2>void</FONT><FONT size=2> LoadReportState(); and </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> SaveReportState(); app-level functions. You can make your own ones</FONT> and select needed settings for load and restore and use your own storage mechanism]]>
   </description>
   <pubDate>Mon, 10 Aug 2009 18:46:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51842&amp;title=serialize-reportcontrol-state-to-file#51842</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : I found that the CReportSampleView...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51841&amp;title=serialize-reportcontrol-state-to-file#51841</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4876">unknow</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 10 August 2009 at 6:44pm<br /><br />I found that the CReportSampleView class from the ReportSample sample already has the code to serialize to/from file;<DIV>&nbsp;</DIV><DIV><EM>void CReportSampleView::LoadReportState()<BR>{<BR>#ifdef XML_STATE<BR>&nbsp;CXTPPropExchangeXMLNode px(TRUE, 0, _T("ReportControl"));<BR>&nbsp;if (!px.LoadFromFile(_T("c:\\ReportControl.xml")))<BR>&nbsp;&nbsp;return;<BR></EM>&nbsp;<BR>But it saves/restore from a single xml file;</DIV><DIV>&nbsp;</DIV><DIV>I would like to save/restore the reportcontrol state from a portion of my XML document, for example it could be placed after my XML data.</DIV><DIV>&nbsp;</DIV><DIV>So now the question is: can I serialize the reportcontrol state from an already opened file? <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>Thankx!</DIV>]]>
   </description>
   <pubDate>Mon, 10 Aug 2009 18:44:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51841&amp;title=serialize-reportcontrol-state-to-file#51841</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : Sure you can do it yourself -...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51494&amp;title=serialize-reportcontrol-state-to-file#51494</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 31 July 2009 at 11:44am<br /><br />Sure you can do it yourself - see <FONT color=#0000ff size=2>void</FONT><FONT size=2> CReportSampleView::LoadReportState()</FONT>]]>
   </description>
   <pubDate>Fri, 31 Jul 2009 11:44:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51494&amp;title=serialize-reportcontrol-state-to-file#51494</guid>
  </item> 
  <item>
   <title><![CDATA[Serialize Reportcontrol state to file? : Hi. I am developping a MDI application...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51445&amp;title=serialize-reportcontrol-state-to-file#51445</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4876">unknow</a><br /><strong>Subject:</strong> 14864<br /><strong>Posted:</strong> 29 July 2009 at 4:40pm<br /><br />Hi. I am developping a MDI application where the document view is a reportcontrol;<DIV>&nbsp;</DIV><DIV>I don't want to store the reportcontrol state in the registry because it will be possible to set the column names, orders, size etc... for each document.</DIV><DIV>&nbsp;</DIV><DIV>So instead, I would like to store/restore the reportcontrol state from the document itself, I mean storing the state in a section of my document file.</DIV><DIV>&nbsp;</DIV><DIV>Can it be done ? and if possible in text/XML format, not binary;</DIV><DIV>&nbsp;</DIV><DIV>Thankx!!</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 29 Jul 2009 16:40:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14864&amp;PID=51445&amp;title=serialize-reportcontrol-state-to-file#51445</guid>
  </item> 
 </channel>
</rss>