title: Crystal Reports XI Custom Group Field
body: <p>I need to create a provider Name group which is based on any or all of three fields that contain service provider codes.  Each Service Provider Code links to its own SP_Program_Location table to optain that providers Provider ID which is then linked to a provider table to obtain the Providers Name.  If no providers have been assigned for a client ( all three provider fields = 0) the provider grouping should be "No PROVIDER ASSIGNED", otherwise, the name of providers need tobe included in the provider group.  The number of providers for a client can range from 0 to 3. As soon as I group on my Provider formula I loose data records.  I am grouping on a location and then Provider followed by Client detail data.</p>
  
  <pre><code>Program.provider1 ----&gt;sp_Program_Location.SP_Program_Location_Codde---&gt;sp_Program_location.Provider_ID ---&gt; Provider.PROVIDER_ID
  
  Program.provider2 ----&gt;sp_Program_Location1.SP_Program_Location_Codde---&gt;sp_Program_location1.Provider_ID ---&gt; Provider1.PROVIDER_ID
  
  Program.provider3 ----&gt;sp_Program_Location2.SP_Program_Location_Codde---&gt;sp_Program_location2.Provider_ID ---&gt; Provider2.PROVIDER_ID
  </code></pre>