上QQ阅读APP看书,第一时间看更新
Time for action – adding functions
We will add a function to color the rows in an alternating manner, differentiating between the even and odd rows, just as they appear in the finished report.
- In the Data tab, we right-click on Functions, and in the drop-down menu, we select the Add Functions... option.
- Now we will see the following window:
- This window contains all of the functions that we can create in PRD grouped into categories. In this case, we choose the Row Banding function in the Report category and click on OK to create it:
- Next, we configure its name, background color, and the name of the element/object that the function will be applied to:
- Function Name =
RowBanding
- Active Banding Color =
#ccff66
- Apply Element(s) Named =
oddEvenRowBanding
- Now that the function has been defined, we can apply it
- Function Name =
- In the Structure tab, navigate to Master Report | Group | Details Body | Details:
- In this tab, we configure the following:
- Attributes.name =
oddEvenRowBanding
This will apply the
oddEvenRowBanding
function to this object. - Attributes.name =
- We see what the report looks like at this point. Press the preview button. We should obtain the following result:
What just happened?
We added a function to alternately color the rows of our report. We configured this function according to our needs and we applied it to our report.