title: Delphi2010 DBGrid1 rows selection and frxReport1.Print
body: <p>I'm a bit confused...
  I have a typical procedure where:</p>
  
  <pre><code>for nJ := 0 to DBGrid1.SelectedRows.Count-1 Do Begin
  DBGrid1.DataSource.DataSet.GotoBookmark(pointer(DBGrid1.SelectedRows.Items[nJ]));
  
  *Do some stuff to get data for a report*
  
  frxReport1.LoadFromFile('report.fr3');
  frxReport1.PrepareReport();
  frxReport1.PrintOptions.Printer := ComboBox1.Text;
  frxReport1.Print;
  
  end;
  </code></pre>
  
  <p>Everything is fine untill I have more than one selection (for example 2-3 rows or whole grid).
  In debug mode this loop runs once ok (SelectedRows.Count value is for example 3) and after going for another run it sets the Count value to 0 each time thus giving me Access Violation error.
  It only happens on frxReport1.Print (same thing with frxReport1.Export(frxPDFExport1)).
  If I remove anything related to printing or exporting loop runs fine till the end.</p>
  
  <p>Funny thing is that I have old application in Delphi 2006 which runs fine and now this happened in Delphi 2010. Both are using FR 4.0.</p>
  
  <p>Help sad.gif It drives me crazy.</p>