<?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>Views</title><link>https://www.infopathdev.com:443/forums/42.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83761.aspx</link><pubDate>Mon, 22 Oct 2012 21:38:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83761</guid><dc:creator>idleloop</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83761.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83761</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;Gennady Vanin (Геннадий Ванин, Новосибирск):&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Why don&amp;#39;t you generate PDF before the click? &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;&lt;p&gt;The whole point of the click is to generate the PDF! The button is&amp;nbsp;literally the &amp;quot;Generate PDF Button&amp;quot;.&lt;/p&gt;&lt;p&gt;The only way that I can see to get the PDF is to have two buttons on the form, one to generate the PDF, and another to do the PDF processing. This is not an ideal solution from a user perspective as it would be much better to have a single button that initiated all of the appropriate processing.&lt;/p&gt;</description></item><item><title>Re: CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83728.aspx</link><pubDate>Mon, 22 Oct 2012 01:28:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83728</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83728.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83728</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;idleloop:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;If I put a close form (after the pdf export) before I exit the handler, the export never runs&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;this seems to me quite logical because the event handler is not finalized (and could have been changing the form itself).&lt;/p&gt;&lt;p&gt;Why don&amp;#39;t you generate PDF before the click? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83726.aspx</link><pubDate>Sun, 21 Oct 2012 23:28:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83726</guid><dc:creator>idleloop</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83726.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83726</wfw:commentRss><description>&lt;p&gt;This is a Filler/Client form, not browser.&lt;/p&gt;&lt;p&gt;The problem is happening regardless of the existence of the target pdf file.&lt;/p&gt;&lt;p&gt;In order to get around the problem, I have put a submit button on the form with &amp;quot;Show message if the form is submitted successfully&amp;quot; checked. Then I have put the code in the Submit Event nof the form.&lt;/p&gt;&lt;p&gt;When the code is on a button event (not a submit button), the call to Export runs, but the actual export does not occur until the code exits the event handler. It is at this point that the &amp;quot;exporting file&amp;quot; progress bar flashes up. If I put a close form (after the pdf export) before I exit the handler, the export never runs.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83724.aspx</link><pubDate>Sun, 21 Oct 2012 23:16:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83724</guid><dc:creator>Gennady Vanin (Геннадий Ванин, Новосибирск)</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83724.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83724</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Is the problem happening when the file with the same name exists and there is a delay for deleting a file?&lt;/p&gt;&lt;p&gt;You could try to run checking that file exists in loop until it is deleted. &lt;/p&gt;&lt;p&gt;Also, it can be runtime optimization so you can try to declare involved variables as &lt;b&gt;volatile&lt;/b&gt;. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;idleloop:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;The short term solution I have employed is to display a message &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You mean to dispaly a Message in a MessageBox? &lt;/p&gt;&lt;p&gt;So, it is in a Filler/client Infopath form? or you are exporting from browser?&lt;/p&gt;&lt;p&gt;This could be caching issues though I do not understand where yiu run the form. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83723.aspx</link><pubDate>Sun, 21 Oct 2012 22:03:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83723</guid><dc:creator>idleloop</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83723.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83723</wfw:commentRss><description>&lt;p&gt;The code is executing in a button click. An export of the form in xml works, but the pdf will not execute until the button click event exits. It is as if the pdf export is async.&lt;/p&gt;&lt;p&gt;The short term solution I have employed is to display a message after the button click and before the form close. This appears to be working, but is not an ideal solution as I would like to run code in the event handler after the pdf export.&lt;/p&gt;</description></item><item><title>Re: CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83711.aspx</link><pubDate>Fri, 19 Oct 2012 22:33:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83711</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83711.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83711</wfw:commentRss><description>Hi - when is this executing? Just on a button click?</description></item><item><title>CurrentView.Export not triggering until exit</title><link>https://www.infopathdev.com:443/forums/thread/83529.aspx</link><pubDate>Mon, 15 Oct 2012 22:16:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83529</guid><dc:creator>idleloop</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83529.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=42&amp;PostID=83529</wfw:commentRss><description>&lt;p&gt;I am having a problem with exporting to PDF from InfoPath 2010 Filler. It appears that the call to CurrentView.Export(&amp;quot;c:\Temp&amp;quot;,ExportFormat.PDF) is not executing until I exit the method that it is called from.&lt;/p&gt;&lt;p&gt;The exported file (and the progress bar) is not appearing until I exit the method, and hence the file is not available to subsequent code.&lt;/p&gt;&lt;p&gt;Is this a known problem? &lt;/p&gt;&lt;p&gt;Has anyone found a solution?&lt;/p&gt;&lt;p&gt;I am trying to export a PDF file and then send the filename to a custom web service that will do some further processing, but the web service cannot find the file&amp;nbsp; as it is called in the same method and the file is not being created until I exit the method.&lt;/p&gt;&lt;p&gt;Dim formAssessmentNo As System.Xml.XPath.XPathNavigator = nav.SelectSingleNode(&amp;quot;/my:AddressChangeData/@my:AssessmentNumber&amp;quot;, Me.NamespaceManager)&lt;br /&gt;Dim formPdfFilename As System.Xml.XPath.XPathNavigator = nav.SelectSingleNode(&amp;quot;/my:AddressChangeData/my:PdfFilename&amp;quot;, Me.NamespaceManager)&lt;/p&gt;&lt;p&gt;Dim fileName As String = String.Format(&amp;quot;{0}.pdf&amp;quot;, formAssessmentNo.Value.ToString)&lt;br /&gt;Dim filePath As String = String.Format(&amp;quot;{0}\{1}&amp;quot;, &amp;quot;&lt;a&gt;\\ServerName\Testing&lt;/a&gt;&amp;quot;, fileName)&lt;/p&gt;&lt;p&gt;formPdfFilename.SetValue(filePath)&lt;/p&gt;&lt;p&gt;If System.IO.File.Exists(filePath) Then System.IO.File.Delete(filePath)&lt;br /&gt;Me.CurrentView.Export(filePath, ExportFormat.Pdf)&lt;/p&gt;&lt;p&gt;Dim ws As WebServiceConnection = Me.DataConnections(&amp;quot;SendEmailAttachment&amp;quot;)&lt;br /&gt;ws.Execute()&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;</description></item></channel></rss>