<?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 : Problem with PrintReport2</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Problem with PrintReport2]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 14:28:38 +0000</pubDate>
  <lastBuildDate>Mon, 05 Jul 2010 05:07:28 +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=16867</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[Problem with PrintReport2 : Aaron,I&amp;#039;ve been through your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59220&amp;title=problem-with-printreport2#59220</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5187">Mike Lewis</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 05 July 2010 at 5:07am<br /><br />Aaron,<br><br>I've been through your code, and as far as I can see it is doing exactly what I am doing. But yours works as expected and mine doesn't. I really can't figure out why.<br><br>Never mind. I'll have to try to find a workaround.<br><br>But thanks anyway for going to so much trouble to help me.<br><br>Best wishes,<br><br>Mike<br>]]>
   </description>
   <pubDate>Mon, 05 Jul 2010 05:07:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59220&amp;title=problem-with-printreport2#59220</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 : Hi Mike,   I did test again...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59187&amp;title=problem-with-printreport2#59187</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 02 July 2010 at 8:26am<br /><br />Hi Mike, <DIV>&nbsp;</DIV><DIV>I did test again and it works as should. I downloaded a class somewhere to set default printer and added code to print RC before setting new default printer and added code to print RC after setting a new default printer:</DIV><DIV>&nbsp;</DIV><DIV>It's created with VB6.0 but maybe you can translate it in your own language...</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;<a href="https://forum.codejock.com/uploads/20100702_082652_SetPrinter.zip" target="_blank">uploads/20100702_082652_SetPrinter.zip</A></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 02 Jul 2010 08:26:23 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59187&amp;title=problem-with-printreport2#59187</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 : Thanks, Aaron. I appreciate your...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59174&amp;title=problem-with-printreport2#59174</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5187">Mike Lewis</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 01 July 2010 at 3:44am<br /><br />Thanks, Aaron. I appreciate your help.<br><br>Mike<br>]]>
   </description>
   <pubDate>Thu, 01 Jul 2010 03:44:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59174&amp;title=problem-with-printreport2#59174</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 : Hi Mike,  You are right, it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59169&amp;title=problem-with-printreport2#59169</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 30 June 2010 at 1:28pm<br /><br />Hi Mike,<DIV>&nbsp;</DIV><DIV>You are right, it doesn't select default printer with steps you mentioned. I did a very quick test but didn't get a chance to investigate why? I will try again and will get back to you.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 30 Jun 2010 13:28:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59169&amp;title=problem-with-printreport2#59169</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 :  Thanks for the reply, Aaron.  When...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59151&amp;title=problem-with-printreport2#59151</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5187">Mike Lewis</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 29 June 2010 at 10:38am<br /><br />Thanks for the reply, Aaron.<br><br>When I said I&nbsp; "Programmatically change the default printer", I mean Icall the SetDefaultPrinter()&nbsp; Windows API function, passing the name ofthe target printer. I know this works, because I have used it in otherother parts of the application, and besides, I can see the new defaultprinter in the Printer and Faxes folder within Windows.<br><br>This is a simplified version of the code (in Visual Foxpro 9.0):<br><br><font face="Courier New, Courier, mono">* Current Windows default printer is "HP Laserjet"<br><br>thisform.oleReportGrid.PrintReport(0)<br>* This displays a printer dialogue, from which I click Cancel. It <br>* then prints the report (as expected).<br><br>SetDefaultPrinter("Amyuni Printer Driver") <br>* This correctly makes Amyuni the new default printer<br><br>thisform.oleReportGrid.PrintReport2(.F.)<br>* This prints the report without a dialogue. I expect it to send the <br>* printout to the Amyuni printer, but it still goes to the Laserjet. </font><br><br>I hope this makes sense.<br><br>Mike<br>]]>
   </description>
   <pubDate>Tue, 29 Jun 2010 10:38:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59151&amp;title=problem-with-printreport2#59151</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 : Hi Mike,  What do you mean by...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59147&amp;title=problem-with-printreport2#59147</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 29 June 2010 at 9:10am<br /><br />Hi Mike,<DIV>&nbsp;</DIV><DIV>What do you mean by "Programmatically change the default printer" </DIV><DIV>&nbsp;</DIV><DIV>Or just copy and paste exact code in here and I will try at the office (tomorrow) and will report back what I found, OK?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 29 Jun 2010 09:10:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59147&amp;title=problem-with-printreport2#59147</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 : Did I explain this problem badly?...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59146&amp;title=problem-with-printreport2#59146</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5187">Mike Lewis</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 29 June 2010 at 8:47am<br /><br />Did I explain this problem badly? I tried to list the steps needed to reproduce the problem.<br><br>Doesn't anyone have any ideas?<br>]]>
   </description>
   <pubDate>Tue, 29 Jun 2010 08:47:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59146&amp;title=problem-with-printreport2#59146</guid>
  </item> 
  <item>
   <title><![CDATA[Problem with PrintReport2 : I am seeing some unexpected behaviour...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59068&amp;title=problem-with-printreport2#59068</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5187">Mike Lewis</a><br /><strong>Subject:</strong> 16867<br /><strong>Posted:</strong> 22 June 2010 at 7:26am<br /><br />I am seeing some unexpected behaviour when trying to print a report:<br><br>1. Call PrintReport, passing 0. Either choose a printer or keep the default. Prints the report as expected.<br><br>2. Programmatically change the default printer.<br><br>3. Call PrintReport2, passing False. This should print to the new default printer, but instead it prints to the printer chosen in Step 1.<br><br>If I exit the application, re-start, and do steps 2 and 3 on their own, the program correctly prints to the new default printer. But when I do the steps in the order shown above, I get the behaviour I described. It's as if the control is remembering the printer that was chosen in PrintReport, and uses this to override the default printer in PrintReport2. The only way to "clear" this setting is to exit the program and re-start.<br><br>Is this a bug? Or am I doing something wrong? <br><br>I am using version 13.1.<br><br>Thanks in advance.<br><br>Mike<br>]]>
   </description>
   <pubDate>Tue, 22 Jun 2010 07:26:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16867&amp;PID=59068&amp;title=problem-with-printreport2#59068</guid>
  </item> 
 </channel>
</rss>