title: Crystal Reports - for do loop that cycles through an array of db fields
body: <p>Trying to make a formula calculate a string in a subreport, the code looks as follows</p>
  
  <pre><code>shared StringVar array aflProc := [{V_APS_ATTRIB.TITLE_1},{V_APS_ATTRIB.TITLE_2},{V_APS_ATTRIB.TITLE_3},{V_APS_ATTRIB.TITLE_4},{V_APS_ATTRIB.TITLE_5},{V_APS_ATTRIB.TITLE_6},{V_APS_ATTRIB.TITLE_7},
  {V_APS_ATTRIB.TITLE_8},{V_APS_ATTRIB.TITLE_9},{V_APS_ATTRIB.TITLE_10},{V_APS_ATTRIB.TITLE_11},{V_APS_ATTRIB.TITLE_12},{V_APS_ATTRIB.TITLE_13},{V_APS_ATTRIB.TITLE_14},{V_APS_ATTRIB.TITLE_15},{V_APS_ATTRIB.TITLE_16},{V_APS_ATTRIB.TITLE_17},{V_APS_ATTRIB.TITLE_18},{V_APS_ATTRIB.TITLE_19},{V_APS_ATTRIB.TITLE_20},{V_APS_ATTRIB.TITLE_21},{V_APS_ATTRIB.TITLE_22},{V_APS_ATTRIB.TITLE_23}];
  shared StringVar aflProc2;
  local numberVar i;
  
  
      For i := 1 to 23 do (
          if aflProc[i] &lt;&gt; "" Then
          aflProc2 := aflProc2 &amp; chr(10) &amp; aflProc[i]
          else aflProc2
      );
  
  aflProc2;
  </code></pre>
  
  <p>tried a few different methods of this, any advice on how to get my formula to output the string from a table of db fields would be helpful.</p>
  
  <p>Thank you</p>