Search code examples
crystal-reports

Crystal Report create separate report pages based on field value change


Looking for some advice related to data grouping and printing in Crystal Reports.

I'm working with an order confirmation form. Ideally I would create separate report pages based on a specific field value change for the 'warehouse' field. So, if any given line on an order comes from warehouse A, it prints together. Then we'd get a page break, and we'd see the form repeat for any lines coming from warehouse B.

I've inserted a new group for "warehouse" and configured the group as 'New Page Before.' But when I attempt to print I'm getting an error related to "There must be a group that matches this field". So there must be some pre-existing grouping that I'm not considering. I'm hopeful I can figure this out.

I am interested to get thoughts on overall design, and if the grouping approach I am trying to take is even the correct one.


Solution

  • Somewhere in your report you probably have a formula such as:

    Sum({some_value}, {some_field})

    where the {some_field} used to be -- but is no longer -- grouped upon.

    Fix that expression to set the desired aggregation level (the 2nd argument) to a field you are actually grouping on.