title: Obtain values from current row when databinding
body: <p>I'm using DevExpress XtraReports in a WinForms application, but could equally apply to other reporting tools.</p>
  
  <p>I'd like to perform some logic per-row in the report as it is "rendered", on a row-by-row basis.  Specifically I'd like to hide a barcode if the data for the barcode isn't available.</p>
  
  <p>Currently I'm doing the following:</p>
  
  <pre><code>private void xrBarCode2_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
  {
      var barcode = (XRBarCode)sender;
  
      if (barcode.Text.Trim() == "")
      {
          barcode.Visible = false;
          lblWarning.Visible = true;
      }
      else
      {
          barcode.Visible = true;
          lblWarning.Visible = false;
      }
  }
  </code></pre>
  
  <p>But that just plain smells bad.  I'd like to access the current data row in this method and work on the "real" properties of the object, but can't.  What is the typical pattern for this in other report generators?  Am I even using the correct event?  I tried <code>Detail_BeforePrint</code>, but that had no additional information.</p>