title: Local Report. GetTotalPages() always return 0
body: <p>I have problem with Microsoft.Reporting.WinForms.LocalReport. Method GetTotalPages() always returns zero even after rendering and saving file. Report generated and saved correctly. Help, please.</p>
  
  <pre><code>foreach (DataSet.PersonsRow person in dataSet.Persons.Rows)
  { 
  
  DataSet.PersonsDataTable persons = new DataSet.PersonsDataTable(); 
  persons.ImportRow(person); ReportViewer rv = new ReportViewer(); 
  string mimeType, encoding, fnameExtension; 
  string[] streamids; Warning[] warnings;
  rv.ProcessingMode = ProcessingMode.Local; 
  rv.LocalReport.ReportPath = "ReportTemplates\\report.rdlc";
  rv.LocalReport.SetParameters(new ReportParameter("Parameter", Settings.Parameter.ToString()));
  rv.LocalReport.DataSources.Add(new ReportDataSource(dataSet.persons.TableName, (DataTable)persons)); 
  rv.LocalReport.DataSources.Add(new ReportDataSource(dataSet.Profile.TableName, (DataTable)dataSet.Profile));
  rv.LocalReport.DataSources.Add(new ReportDataSource(dataSet.Places.TableName, dataSet.Equipment.Where(tc =&gt; tc.PersonID == person.PersonID)));
  byte[] bytes = rv.LocalReport.Render(OutputTypeStr, "&lt;DeviceInfo&gt;&lt;SimplePageHeaders&gt;True&lt;/SimplePageHeaders&gt;&lt;/DeviceInfo&gt;", out mimeType, out encoding, out fnameExtension, out streamids, out warnings);
  
  int pagesCount = rv.LocalReport.GetTotalPages(); // pagesCount equal zero 
  using (FileStream fs = new FileStream(filename, FileMode.Create)) 
  {
      fs.Write(bytes, 0, bytes.Length);
      fs.Close(); 
      pagesCount = rv.LocalReport.GetTotalPages(); // pagesCount also equal zero 
  } 
  
  }   
  </code></pre>