text: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
  <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      
      <title>Grouping Bands &mdash; Geraldo Reports Documentation v0.4.1-stable documentation</title>
      <link rel="stylesheet" href="../_static/default.css" type="text/css" />
      <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
      <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '0.4.1-stable',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html',
          HAS_SOURCE:  true
        };
      </script>
      <script type="text/javascript" src="../_static/jquery.js"></script>
      <script type="text/javascript" src="../_static/doctools.js"></script>
      <link rel="top" title="Geraldo Reports Documentation v0.4.1-stable documentation" href="../index.html" />
      <link rel="up" title="Examples" href="index.html" />
      <link rel="next" title="SubReports" href="subreport.html" />
      <link rel="prev" title="Child Bands" href="child-bands.html" /> 
    </head>
    <body>
      <div class="related">
        <h3>Navigation</h3>
        <ul>
          <li class="right" style="margin-right: 10px">
            <a href="../genindex.html" title="General Index"
               accesskey="I">index</a></li>
          <li class="right" >
            <a href="subreport.html" title="SubReports"
               accesskey="N">next</a> |</li>
          <li class="right" >
            <a href="child-bands.html" title="Child Bands"
               accesskey="P">previous</a> |</li>
          <li><a href="../index.html">Geraldo Reports Documentation v0.4.1-stable documentation</a> &raquo;</li>
            <li><a href="index.html" accesskey="U">Examples</a> &raquo;</li> 
        </ul>
      </div>  
  
      <div class="document">
        <div class="documentwrapper">
          <div class="bodywrapper">
            <div class="body">
              
    <div class="section" id="grouping-bands">
  <h1>Grouping Bands<a class="headerlink" href="#grouping-bands" title="Permalink to this headline">¶</a></h1>
  <p>This example uses grouping bands. We must have support for multiple
  groups in a report.</p>
  <p>Grouping is something like this:</p>
  <ul class="simple">
  <li>Country</li>
  </ul>
  <blockquote>
  <ul class="simple">
  <li>City</li>
  </ul>
  <blockquote>
  <ul class="simple">
  <li>Soccer team</li>
  </ul>
  </blockquote>
  </blockquote>
  <p>As you can see above we have 2 groupings: by country and by city (under
  country).</p>
  <p>In this test we work with users as following:</p>
  <ul class="simple">
  <li>If staff</li>
  </ul>
  <blockquote>
  <ul class="simple">
  <li>If superuser</li>
  </ul>
  <blockquote>
  <ul class="simple">
  <li>User</li>
  </ul>
  </blockquote>
  </blockquote>
  <p>See below:</p>
  <div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span>
  <span class="n">cur_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">__file__</span><span class="p">))</span>
  
  <span class="kn">from</span> <span class="nn">django.contrib.auth.models</span> <span class="kn">import</span> <span class="n">User</span>
  
  <span class="kn">from</span> <span class="nn">reportlab.lib.pagesizes</span> <span class="kn">import</span> <span class="n">A4</span>
  <span class="kn">from</span> <span class="nn">reportlab.lib.units</span> <span class="kn">import</span> <span class="n">cm</span>
  <span class="kn">from</span> <span class="nn">reportlab.lib.enums</span> <span class="kn">import</span> <span class="n">TA_CENTER</span><span class="p">,</span> <span class="n">TA_JUSTIFY</span>
  <span class="kn">from</span> <span class="nn">reportlab.lib.colors</span> <span class="kn">import</span> <span class="n">navy</span><span class="p">,</span> <span class="n">yellow</span><span class="p">,</span> <span class="n">red</span>
  
  <span class="kn">from</span> <span class="nn">geraldo</span> <span class="kn">import</span> <span class="n">Report</span><span class="p">,</span> <span class="n">ReportBand</span><span class="p">,</span> <span class="n">Label</span><span class="p">,</span> <span class="n">ObjectValue</span><span class="p">,</span> <span class="n">SystemField</span><span class="p">,</span>\
      <span class="n">FIELD_ACTION_COUNT</span><span class="p">,</span> <span class="n">FIELD_ACTION_SUM</span><span class="p">,</span> <span class="n">BAND_WIDTH</span><span class="p">,</span> <span class="n">Line</span><span class="p">,</span> <span class="n">ReportGroup</span>
  
  <span class="k">class</span> <span class="nc">GrouppingReport</span><span class="p">(</span><span class="n">Report</span><span class="p">):</span>
      <span class="n">title</span> <span class="o">=</span> <span class="s">&#39;Groupping demonstration&#39;</span>
  
      <span class="k">class</span> <span class="nc">band_summary</span><span class="p">(</span><span class="n">ReportBand</span><span class="p">):</span>
          <span class="n">height</span> <span class="o">=</span> <span class="mf">0.8</span><span class="o">*</span><span class="n">cm</span>
          <span class="n">elements</span> <span class="o">=</span> <span class="p">[</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&quot;Users count:&quot;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">0</span><span class="p">),</span>
              <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;id&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">4</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>\
                  <span class="n">action</span><span class="o">=</span><span class="n">FIELD_ACTION_COUNT</span><span class="p">,</span> <span class="n">display_format</span><span class="o">=</span><span class="s">&#39;</span><span class="si">%s</span><span class="s"> users found&#39;</span><span class="p">),</span>
          <span class="p">]</span>
          <span class="n">borders</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;all&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">}</span>
  
      <span class="k">class</span> <span class="nc">band_page_header</span><span class="p">(</span><span class="n">ReportBand</span><span class="p">):</span>
          <span class="n">height</span> <span class="o">=</span> <span class="mf">1.3</span><span class="o">*</span><span class="n">cm</span>
          <span class="n">elements</span> <span class="o">=</span> <span class="p">[</span>
              <span class="n">SystemField</span><span class="p">(</span><span class="n">expression</span><span class="o">=</span><span class="s">&#39;</span><span class="si">%(report_title)s</span><span class="s">&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">width</span><span class="o">=</span><span class="n">BAND_WIDTH</span><span class="p">,</span>
                  <span class="n">style</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;fontName&#39;</span><span class="p">:</span> <span class="s">&#39;Helvetica-Bold&#39;</span><span class="p">,</span> <span class="s">&#39;fontSize&#39;</span><span class="p">:</span> <span class="mi">14</span><span class="p">,</span> <span class="s">&#39;alignment&#39;</span><span class="p">:</span> <span class="n">TA_CENTER</span><span class="p">}),</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&quot;ID&quot;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.8</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">0</span><span class="p">),</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&quot;Username&quot;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.8</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">3</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&quot;First name&quot;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.8</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">8</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&quot;Superuser&quot;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.8</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">13</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&quot;Staff&quot;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.8</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">18</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
          <span class="p">]</span>
          <span class="n">borders</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;bottom&#39;</span><span class="p">:</span> <span class="n">Line</span><span class="p">(</span><span class="n">stroke_color</span><span class="o">=</span><span class="n">red</span><span class="p">,</span> <span class="n">stroke_width</span><span class="o">=</span><span class="mi">3</span><span class="p">)}</span>
  
      <span class="k">class</span> <span class="nc">band_page_footer</span><span class="p">(</span><span class="n">ReportBand</span><span class="p">):</span>
          <span class="n">height</span> <span class="o">=</span> <span class="mf">0.5</span><span class="o">*</span><span class="n">cm</span>
          <span class="n">elements</span> <span class="o">=</span> <span class="p">[</span>
              <span class="n">Label</span><span class="p">(</span><span class="n">text</span><span class="o">=</span><span class="s">&#39;Created with Geraldo Reports&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
          <span class="p">]</span>
          <span class="n">borders</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;top&#39;</span><span class="p">:</span> <span class="n">Line</span><span class="p">(</span><span class="n">stroke_color</span><span class="o">=</span><span class="n">navy</span><span class="p">)}</span>
  
      <span class="k">class</span> <span class="nc">band_detail</span><span class="p">(</span><span class="n">ReportBand</span><span class="p">):</span>
          <span class="n">height</span> <span class="o">=</span> <span class="mf">0.7</span><span class="o">*</span><span class="n">cm</span>
          <span class="n">elements</span> <span class="o">=</span> <span class="p">[</span>
              <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;id&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">1</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
              <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;username&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">3</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
              <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;first_name&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">8</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
              <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;is_superuser&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">13</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                  <span class="n">get_value</span><span class="o">=</span><span class="k">lambda</span> <span class="n">instance</span><span class="p">:</span> <span class="n">instance</span><span class="o">.</span><span class="n">is_superuser</span> <span class="ow">and</span> <span class="s">&#39;Yes&#39;</span> <span class="ow">or</span> <span class="s">&#39;No&#39;</span><span class="p">),</span>
              <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;is_staff&#39;</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">18</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                  <span class="n">get_value</span><span class="o">=</span><span class="k">lambda</span> <span class="n">instance</span><span class="p">:</span> <span class="n">instance</span><span class="o">.</span><span class="n">is_staff</span> <span class="ow">and</span> <span class="s">&#39;Yes&#39;</span> <span class="ow">or</span> <span class="s">&#39;No&#39;</span><span class="p">),</span>
          <span class="p">]</span>
  
      <span class="n">groups</span> <span class="o">=</span> <span class="p">[</span>
          <span class="n">ReportGroup</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;is_superuser&#39;</span><span class="p">,</span>
              <span class="n">band_header</span><span class="o">=</span><span class="n">ReportBand</span><span class="p">(</span>
                  <span class="n">height</span><span class="o">=</span><span class="mf">0.7</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                  <span class="n">elements</span><span class="o">=</span><span class="p">[</span>
                      <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;is_superuser&#39;</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                          <span class="n">get_value</span><span class="o">=</span><span class="k">lambda</span> <span class="n">instance</span><span class="p">:</span> <span class="s">&#39;Superuser: &#39;</span> <span class="o">+</span> <span class="p">(</span><span class="n">instance</span><span class="o">.</span><span class="n">is_superuser</span> <span class="ow">and</span> <span class="s">&#39;Yes&#39;</span> <span class="ow">or</span> <span class="s">&#39;No&#39;</span><span class="p">),</span>
                          <span class="n">style</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;fontName&#39;</span><span class="p">:</span> <span class="s">&#39;Helvetica-Bold&#39;</span><span class="p">,</span> <span class="s">&#39;fontSize&#39;</span><span class="p">:</span> <span class="mi">12</span><span class="p">})</span>
                  <span class="p">],</span>
                  <span class="n">borders</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;bottom&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
              <span class="p">),</span>
              <span class="n">band_footer</span><span class="o">=</span><span class="n">ReportBand</span><span class="p">(</span>
                  <span class="n">height</span><span class="o">=</span><span class="mf">0.7</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                  <span class="n">elements</span><span class="o">=</span><span class="p">[</span>
                      <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;id&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="n">FIELD_ACTION_COUNT</span><span class="p">,</span>
                          <span class="n">display_format</span><span class="o">=</span><span class="s">&#39;</span><span class="si">%s</span><span class="s"> superusers&#39;</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">0</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
                      <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;id&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="n">FIELD_ACTION_SUM</span><span class="p">,</span>
                          <span class="n">display_format</span><span class="o">=</span><span class="s">&#39;</span><span class="si">%s</span><span class="s"> is the sum of IDs above&#39;</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mi">4</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">),</span>
                  <span class="p">],</span>
                  <span class="n">borders</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;top&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
              <span class="p">),</span>
          <span class="p">),</span>
          <span class="n">ReportGroup</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;is_staff&#39;</span><span class="p">,</span>
              <span class="n">band_header</span><span class="o">=</span><span class="n">ReportBand</span><span class="p">(</span>
                  <span class="n">height</span><span class="o">=</span><span class="mf">0.7</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                  <span class="n">elements</span><span class="o">=</span><span class="p">[</span>
                      <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;is_staff&#39;</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mf">0.5</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                          <span class="n">get_value</span><span class="o">=</span><span class="k">lambda</span> <span class="n">instance</span><span class="p">:</span> <span class="s">&#39;Staff: &#39;</span> <span class="o">+</span> <span class="p">(</span><span class="n">instance</span><span class="o">.</span><span class="n">is_staff</span> <span class="ow">and</span> <span class="s">&#39;Yes&#39;</span> <span class="ow">or</span> <span class="s">&#39;No&#39;</span><span class="p">))</span>
                  <span class="p">],</span>
                  <span class="n">borders</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;bottom&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
              <span class="p">),</span>
              <span class="n">band_footer</span><span class="o">=</span><span class="n">ReportBand</span><span class="p">(</span>
                  <span class="n">height</span><span class="o">=</span><span class="mf">0.7</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span>
                  <span class="n">elements</span><span class="o">=</span><span class="p">[</span>
                      <span class="n">ObjectValue</span><span class="p">(</span><span class="n">attribute_name</span><span class="o">=</span><span class="s">&#39;id&#39;</span><span class="p">,</span> <span class="n">action</span><span class="o">=</span><span class="n">FIELD_ACTION_COUNT</span><span class="p">,</span>
                          <span class="n">display_format</span><span class="o">=</span><span class="s">&#39;</span><span class="si">%s</span><span class="s"> staffs&#39;</span><span class="p">,</span> <span class="n">left</span><span class="o">=</span><span class="mf">0.5</span><span class="o">*</span><span class="n">cm</span><span class="p">,</span> <span class="n">top</span><span class="o">=</span><span class="mf">0.1</span><span class="o">*</span><span class="n">cm</span><span class="p">)</span>
                  <span class="p">],</span>
                  <span class="n">borders</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;top&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">},</span>
              <span class="p">),</span>
          <span class="p">),</span>
      <span class="p">]</span>
  </pre></div>
  </div>
  <p>Generating PDF...</p>
  <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">queryset</span> <span class="o">=</span> <span class="n">User</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">order_by</span><span class="p">(</span><span class="s">&#39;is_superuser&#39;</span><span class="p">,</span><span class="s">&#39;is_staff&#39;</span><span class="p">,</span><span class="s">&#39;id&#39;</span><span class="p">)</span>
  <span class="gp">&gt;&gt;&gt; </span><span class="n">report</span> <span class="o">=</span> <span class="n">GrouppingReport</span><span class="p">(</span><span class="n">queryset</span><span class="o">=</span><span class="n">queryset</span><span class="p">)</span>
  <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">geraldo.generators</span> <span class="kn">import</span> <span class="n">PDFGenerator</span>
  <span class="gp">&gt;&gt;&gt; </span><span class="n">report</span><span class="o">.</span><span class="n">generate_by</span><span class="p">(</span><span class="n">PDFGenerator</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">cur_dir</span><span class="p">,</span> <span class="s">&#39;output/groupping-report.pdf&#39;</span><span class="p">))</span>
  </pre></div>
  </div>
  <p>The Result</p>
  <ul class="simple">
  <li><a class="reference external" href="http://geraldo.svn.sourceforge.net/viewvc/geraldo/examples/groupping-report.pdf">http://geraldo.svn.sourceforge.net/viewvc/geraldo/examples/groupping-report.pdf</a></li>
  </ul>
  </div>
  
  
            </div>
          </div>
        </div>
        <div class="sphinxsidebar">
          <div class="sphinxsidebarwrapper">
              <h4>Previous topic</h4>
              <p class="topless"><a href="child-bands.html"
                                    title="previous chapter">Child Bands</a></p>
              <h4>Next topic</h4>
              <p class="topless"><a href="subreport.html"
                                    title="next chapter">SubReports</a></p>
              <h3>This Page</h3>
              <ul class="this-page-menu">
                <li><a href="../_sources/examples/grouping.txt"
                       rel="nofollow">Show Source</a></li>
              </ul>
            <div id="searchbox" style="display: none">
              <h3>Quick search</h3>
                <form class="search" action="../search.html" method="get">
                  <input type="text" name="q" size="18" />
                  <input type="submit" value="Go" />
                  <input type="hidden" name="check_keywords" value="yes" />
                  <input type="hidden" name="area" value="default" />
                </form>
                <p class="searchtip" style="font-size: 90%">
                Enter search terms or a module, class or function name.
                </p>
            </div>
            <script type="text/javascript">$('#searchbox').show(0);</script>
          </div>
        </div>
        <div class="clearer"></div>
      </div>
      <div class="related">
        <h3>Navigation</h3>
        <ul>
          <li class="right" style="margin-right: 10px">
            <a href="../genindex.html" title="General Index"
               >index</a></li>
          <li class="right" >
            <a href="subreport.html" title="SubReports"
               >next</a> |</li>
          <li class="right" >
            <a href="child-bands.html" title="Child Bands"
               >previous</a> |</li>
          <li><a href="../index.html">Geraldo Reports Documentation v0.4.1-stable documentation</a> &raquo;</li>
            <li><a href="index.html" >Examples</a> &raquo;</li> 
        </ul>
      </div>
      <div class="footer">
        &copy; Copyright 2009-2010, Marinho Brandao.
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
      </div>
    </body>
  </html>