title: What causes the "Page Header plus Page Footer is too large for the page" error in Crystal Reports?
body: <p>I have used the following code for a print button:</p>
  
  <pre><code>Data.str = null;
  //Data.str = textBox24.Text.ToString();
  string s = "select * from temp_bond";
  cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\\Real.mdb";
  cn.Open();
  
  DataSet ds = new DataSet();
  
  OleDbDataAdapter da = new OleDbDataAdapter(s, cn);
  ds.Clear();
  da.Fill(ds);
  Bond rpt = new Bond();
  rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "BOND_" + Data.str + ".pdf");
  System.Diagnostics.Process.Start("BOND_" + Data.str + ".pdf");
  //r.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "E:\\rep.pdf");
  //crystalReportViewer1.ReportSource = r;
  OleDbCommand cm1 = new OleDbCommand("delete * from temp_bond", cn);
  cm1.ExecuteNonQuery();
  cn.Close();
  </code></pre>
  
  <p>and I'm getting an error in this code:</p>
  
  <pre><code>rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "BOND_" + Data.str + ".pdf");
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Page Header plus Page Footer is too large for the page. Error in File
    C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp_3f674868-8e5d-46ce-80eb-dce78bb2ba89
    {17674136-B71E-4C6F-9E36-1CEB514B13BF}.rpt: Page header or footer
    longer than a page.</p>
  </blockquote>
  
  <p>What can cause this and how can I fix it?</p>