When you have no grouping, the formula in the Report Header is going to be based on the first record that appears on the report. In your case, the first record makes sense when plugged into your formula, so you get a result. When you group the data, the formula in the Report Header is going to evaluate the first record of the first group (Product Line). For whatever reason, plugging the values from that record into the formula does not return a valid result. You might try going to Report Options and checking the first two checkboxes regarding NULL values. This may or may not work depending on what's in that first record. If you are trying to get a Heading for each group, move the formula down to the group header. With the formula in the Report Header, you will only get one occurrence of the formula per the entire report.