title: How do you reference a field in the Embedded Code of an SSRS report
body: <p>Is there a proper way to reference the fields of a ssrs report from the embedded code of an ssrs report?</p>
  
  <p>When I try to use <code>Fields!Program.Value</code> I get the following error -- </p>
  
  <blockquote>
    <p><em>There is an error on line 3 of custom code: [BC30469]<br>
        Reference to a non-shared member requires an object reference.</em></p>
  </blockquote>
  
  <p>Upon googling I found you could reference the Parameters of a report by prepending <code>Report.</code> at the beginning. So I tried this <code>Report.Fields.Program.Value</code>.  </p>
  
  <p>That results in the following error...</p>
  
  <blockquote>
    <p><em>There is an error on line 3 of custom code: [BC30456] 'Fields' is not a member of 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.IReportObjectModelProxyForCustomCode'.</em></p>
  </blockquote>
  
  <p>So... in summary, is there a way to reference the fields from the embedded code. I figured out I could pass the field vals to the function itself but I would prefer to reference the fields directly.</p>
  
  <p>Seth</p>