<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Office Web Components Charting within Infopath</title><link>https://www.infopathdev.com:443/forums/thread/42667.aspx</link><pubDate>Tue, 09 Jun 2009 23:13:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42667</guid><dc:creator>kabeero</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42667.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=42667</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;For those interested in coming up with a solution , here is what worked.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To get an image to be displayed in Infopath I made a key value called my:value under the myFields subfolder in Data Sources.&lt;/p&gt;&lt;p&gt;My web service was returning a path which I was assigning to this key value.&lt;/p&gt;&lt;p&gt;A picture control&amp;nbsp; was linked to the my:value&amp;#39;s XPath and &amp;quot;Allow users to upload an image&amp;quot; was disabled.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To get this to work, I had to modify the code behind a button I was calling Generate Graph, and pulled up its C# code.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Here, under the Clicked Event for the button control, I added the following:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="csharp" style="font-family:monospace;"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;public&lt;/span&gt; &lt;span class="kw1"&gt;void&lt;/span&gt; CTRL2_6_Clicked&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw4"&gt;object&lt;/span&gt; sender, ClickedEventArgs e&lt;span class="br0"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;{&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GenerateGraph&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw1"&gt;private&lt;/span&gt; &lt;span class="kw1"&gt;void&lt;/span&gt; GenerateGraph&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="kw4"&gt;string&lt;/span&gt; path = &lt;span class="kw1"&gt;auto&lt;/span&gt;.&lt;span class="me1"&gt;Graph&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XPathNavigator xnDoc = &lt;span class="kw1"&gt;this&lt;/span&gt;.&lt;span class="me1"&gt;MainDataSource&lt;/span&gt;.&lt;span class="me1"&gt;CreateNavigator&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XPathNavigator xnPath = xnDoc.&lt;span class="me1"&gt;SelectSingleNode&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;&amp;quot;/dfs:myFields/my:value&amp;quot;&lt;/span&gt;, &lt;span class="kw1"&gt;this&lt;/span&gt;.&lt;span class="me1"&gt;NamespaceManager&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xnPath.&lt;span class="me1"&gt;SetValue&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;path&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Note: auto is my webservice which I&amp;#39;ve instantiated in the InternalStartup() method which is provided by default.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Office Web Components Charting within Infopath</title><link>https://www.infopathdev.com:443/forums/thread/42544.aspx</link><pubDate>Fri, 05 Jun 2009 19:28:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42544</guid><dc:creator>kabeero</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42544.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=42544</wfw:commentRss><description>&lt;p&gt;Update:&lt;/p&gt;&lt;p&gt;One of the things I&amp;#39;ve tried so far is saving the chart as an image instead of exporting to a webpage.&amp;nbsp; I then put this code in a web service and returned the path&amp;#39;s string value, which I was hoping to put into my infopath form as a &amp;lt;img src=path/&amp;gt; but I have yet to get this to work.&amp;nbsp; However, I am able to control where the image is stored, how it is opened, etc by doing this instead of going to an .aspx page so this is a better result.&lt;/p&gt;&lt;p&gt;Does anyone have any clue how I can use this path to output as an image within my form? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Office Web Components Charting within Infopath</title><link>https://www.infopathdev.com:443/forums/thread/42536.aspx</link><pubDate>Fri, 05 Jun 2009 15:56:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42536</guid><dc:creator>kabeero</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42536.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=42536</wfw:commentRss><description>&lt;p&gt;Hello.&amp;nbsp; I have been trying to build a &amp;quot;reports&amp;quot;-type page in my Infopath form using the charting capabilities provided by Office Web Components/OWC.&lt;/p&gt;&lt;p&gt;So far I have gotten my chart to be rendered into a .PNG image using the tutorial provided by Negovan (&lt;a href="http://aspnetresources.com/articles/office_web_components.aspx" title="OWC Charting" target="_blank"&gt;Link&lt;/a&gt;), but it can only be rendered by going to an aspx page, e.g. samplegraph.aspx.&amp;nbsp; Once this page is loaded the image is created.&amp;nbsp; The reason I cannot link this as a fixed image is because I am retrieving information from a database (which will be updated using this form) which can change the way the image looks, so I want this to be rendered using the form.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I do not want my Infopath form to open an external window so I am skeptical about simply hyperlinking to an .aspx page.&amp;nbsp; My instincts tell me to write &amp;lt;img src=&amp;quot;samplegraph.aspx&amp;quot; /&amp;gt; but I do not know if this will work, or even where to include it in my Infopath form.&lt;/p&gt;&lt;p&gt;I understand OWC has introduced a custom control in Infopath called &amp;quot;Microsoft Office Chart 11.0&amp;quot; that is supposed to provide similar capabilities but I have been unable to get it to work.&amp;nbsp; I am pretty sure this could get the same kind of graph for me but I am not sure how to code it to retrieve from the database as the tutorial from Negovan has allowed me to do.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any advice or suggestions are appreciated. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>