<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Changing Views</title><link>https://www.infopathdev.com:443/forums/thread/13179.aspx</link><pubDate>Tue, 29 Mar 2005 22:44:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13179</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13179.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13179</wfw:commentRss><description>InfoPath does not allow you to switch views, during a view switch. You may not think you are doing that, but you likely are (so far as InfoPath is concerned).&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]&lt;br /&gt;InfoPathDev</description></item><item><title>Re: Changing Views</title><link>https://www.infopathdev.com:443/forums/thread/13178.aspx</link><pubDate>Mon, 28 Mar 2005 17:05:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13178</guid><dc:creator>Shanthi Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13178.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13178</wfw:commentRss><description>Did this problem get solved? If not, can you paste your code in here. This code is being run onClick of a button correct?&lt;br /&gt;&lt;br /&gt;Shanthi&lt;br /&gt;InfoPathDev India</description></item><item><title>Re: Changing Views</title><link>https://www.infopathdev.com:443/forums/thread/13177.aspx</link><pubDate>Thu, 17 Mar 2005 21:57:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13177</guid><dc:creator>gmcallister</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13177.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13177</wfw:commentRss><description>You are correct but I have tried the combination you suggested and get the same error when it tries to switch back. Thanks fo trying - any other possibilities?&lt;br /&gt;&lt;br /&gt;"One Line at a Time" - anonymous codeaholic&lt;br /&gt;Greg McAllister</description></item><item><title>Re: Changing Views</title><link>https://www.infopathdev.com:443/forums/thread/13176.aspx</link><pubDate>Wed, 16 Mar 2005 19:46:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13176</guid><dc:creator>Shanthi Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13176.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13176</wfw:commentRss><description>I think what you are doing is&lt;br /&gt;1. First switch to the print view as a rule on the button&lt;br /&gt;2. Then in the onclick function PrintOut() happens&lt;br /&gt;3. At the end of the onClick function you are doing a switch view back to the main view&lt;br /&gt;&lt;br /&gt;This problems seems to be solved when when the first switchView() is also called in the code instead of calling it as a rule.&lt;br /&gt;&lt;br /&gt;Do i have the issue correctly? or are you doing something different?&lt;br /&gt;&lt;br /&gt;Shanthi&lt;br /&gt;InfoPathDev India</description></item><item><title>Changing Views</title><link>https://www.infopathdev.com:443/forums/thread/12438.aspx</link><pubDate>Wed, 16 Mar 2005 17:53:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12438</guid><dc:creator>gmcallister</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12438.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12438</wfw:commentRss><description>I am trying to change views twice. The first change view occurs at when the user clicks on a print button. The view switches to the particular print view and then through jscript(using.PrintOut()) the form prints. Then I try to change the view in the script using the .SwitchView("") and I get an error: &lt;i&gt;InfoPath cannot execute any view-related object model calls.&lt;/i&gt; The view is not ready.&lt;br /&gt;&lt;br /&gt;I imagine I have forgotten to add something but for the life of me...&lt;br /&gt;&lt;br /&gt;Please provide insight to what I need to do to have the view return to the default once the form has printed?&lt;br /&gt;&lt;br /&gt;"One Line at a Time" - anonymous codeaholic&lt;br /&gt;Greg McAllister</description></item></channel></rss>