Skip to content

Gradient type

The background color of an object or section can be uniform, appearing the same from left to right and top to bottom. This choice is called Solid. Alternatively, it can use a gradient, which transitions smoothly between two or more colors. A gradient has a defined start and end color, and it often shifts from a darker shade to a lighter one—or even to full transparency. However, the reverse direction, or other color combinations, are equally possible.

When using a gradient color in a PDF output, make sure the option for high quality images is turned on.

The gradient type can be chosen from the combo-box or returned by a function where the function returns one of the constants defined for the gradient type. With a function, it would be possible to do:

select case {?GradientChoice}
    case 1
        return drHorizontalGradient
    break
    case 2
        return drVerticalGradient
    break
    case else
        return drSolid
    break
end

Then add code to the project that integrates this report to set the GradientChoice parameter. This is a self-defined parameter.