title: Hide a column in cross-tab depending on the value of parameter (Crystal Reports XI)
body: <p>I'm using Crystal Reports XI (R2) and have a cross-tab which displays information about flights. There is the 'Total' column' as well as the Arrivals and Departures columns which are created automatically thanks to the grouping condition. What I'm trying to do is to have the 'flight directions' parameter, where the user can select 'All, departures only or arrivals only' values and according to this selection the cross-tab would have one or two columns. How can this be achieved? I tried using the following formula(and have the suppress empty columns option enabled) :</p>
  
  <pre><code>if {?Pm-@flight_direction_description} = "Departures Only"
  then
  if ({Command_1.IsArrival} = 1)
  then 0
  else {Command_1.IsArrival}
  </code></pre>
  
  <p>which indeed works (only one column is displayed) but then under the Departures column it lists all the flights (so the departures column is the same as the Total column) whereas it should only display information about departing flights.</p>