title: Loading new XML file when printing Crystal Reports
body: <p>got some help on here last week in regards to printing with the office.interop dll's. My application is required to print of data from new database entries in a report style format, I successfully did this using the office.interop functions, however, I never realised you would require office to be installed on the computer for it to work, so after a bit of researching, I have realised the only realistic way is to use Crystal Reports, unless anyone has any other suggestion?</p>
  
  <p>So, the question: I have successfully set up the Crystal Report to read from XML files to generate, and it works great, I can print it off no problem. I generate the XML files by filling a dataset with data pulled from a mySql database in the main code of my program, however, even when I add new information, which generates the XML file again, and overrites the previous one, the report still prints the original XML file that i used to generate the report. So I am wondering if there is a way to get the report to refresh its data and pull details from the XML file again, before printing. </p>
  
  <p>I have tried the .Refresh() on the report before the print function, however i get a database error and nothing printed.</p>
  
  <p>Here is the code i use to print the report:</p>
  
  <pre><code>checkInReceipt cir = new checkInReceipt();
  cir.Refresh(); // if i leave this in, it generates a db error, take it out and it prints data from an old XML file.
  cir.PrintToPrinter(1, true, 1, 1);
  </code></pre>