Skip to content

Previous and next functions

What is new - 3.0

At a certain point in a report, it might be useful to know the value of the next record. An example, albeit a bit trivial, is to group the Customer List per State and, for each State, add a comment with the last Customer in that State.

One way to achieve this is by adding a Details section below the original Details section that contains a function to display this comment:

if next({Customer.State}) <> {Customer.State} then return "This is the Last Customer."
end

The details where this text is not appropriate (all but the last one) are suppressed in the Section Expert with the following function:

return next({Customer.State}) = {Customer.State}

The result will look like the report below.

Previous and Next functions in v3.0