In this section we will see how to use formula fields and how they are useful and powerful for improving our reports.
From Field Explorer, right-click on Formula Fields and select New. Type in the formula name
fmu_FullName
and click on the OK button. We will see this in the following screenshot:This formula field will display the employee's full name in the same format that we created before using SQL query. Here we use the concatenate operator (
+
) to concatenate the title with the first and last name of the employee.Create another formula field and name it
fmu_ReportsTo
. You will see the formula code in the following screenshot:Drag-and-drop the two formula fields to the report as we did previously.
Add a parameter field to the report and name it
EmpId
. We will use this parameter to filter the employees by ID as we see in the following screenshot:Open MainForm from Solution Explorer. Double-click on the btnEmpById button to move to the click event code and write...