title: Crystal Reports: Declaring Color Array Variable
body: <p>This seems like a simple question with a simple answer but is there a ColorVar type? I haven't been able to find anything about this anywhere online.</p>
  <p>For example,
  I create an array of numbers like this:</p>
  <pre><code>local NumberVar index := 2;
  local NumberVar Array numarr := [0,1,2,3];
  numarr[index]
  </code></pre>
  <p>I would like to create an array of colors in the same way and then index into it later.</p>
  <p>I can do something like this:</p>
  <pre><code>[crBlack, crWhite, color(100, 231, 100), ...][index]
  </code></pre>
  <p>This suggests space is being allocated for the color array, is there something like a ColorVar or is it being allocated as a NumberVar or something?</p>
  <p>Thanks <a href="https://stackoverflow.com/users/1734722/milletsoftware">MilletSoftware</a>!
  I was able to implement what I was trying to:</p>
  <pre><code>local numbervar array rowColors := [
      color(234, 247, 255), crWhite,              //Default
      color(255, 196, 232), color(255, 214, 239), //Highlight #1
      color(...), color(...)                      //Highlight #2
  ];
  local numbervar colorIndex := RecordNumber mod 2 + 1 + switch(highlight1case, 2, highlight2case, 4, ..., caseN, 2N, true, 0);
  rowColors[colorIndex]
  </code></pre>