Pro SQL Server 2012 Reporting Services

(sharon) #1
CHAPTER 13  CREATING REPORTS USING REPORT BUILDER 1.0, 2.0, AND 3.0

Figure 13-25. Setting the page orientation


To make even more room, you can use a formula to combine the patient’s first and last names. To
do this, simply right-click the Pat First Name data cell, and select Edit Formula. This will open the Define
Formula window. Formulas in Report Builder 1.0 are like expressions in BIDS. Here is where you can
combine report fields and built-in functions to produce the desired value. Figure 13-26 shows the Define
Formula dialog box with several available functions. Notice the formula used to concatenate the Pat First
Name and Pat Last Name fields, which uses report data fields and an ampersand (&) to add a literal
comma character to separate the names. You can also use the RTRIM function to remove trailing spaces.
You could have done much of this work in the report model, where it most likely should have been done.
However, we had you leave the names this way so we could now demonstrate the use of a simple
formula. Once the formula is in place, click the Save this formula as a new Patient Census field, and click
OK. You are then prompted to enter the New Field Name. Call this field Patient Name and click OK to
save your new field.

Free download pdf