nerdexam
Microsoft

70-466 · Question #140

You are developing a new SQL Server Reporting Services (SSRS) report in SQL Server Data Tools (SSDT). The report must define a report parameter to prompt the user for the business unit. Each business

The correct answer is D. Add two Microsoft Visual C# functions to the code block of the report to implement FontFamily and FontSize functions. For each header text box, use expressions to set the FontFamily and FontSize properties by using the functions.. SSRS custom code functions allow centralized, reusable logic for dynamic font properties driven by report parameters, making them the best solution for per-business-unit font schemes.

Build reports

Question

You are developing a new SQL Server Reporting Services (SSRS) report in SQL Server Data Tools (SSDT). The report must define a report parameter to prompt the user for the business unit. Each business unit has a unique font scheme combination of font and size properties. You need to ensure that all of the text boxes in the table headers use the correct business unit font properties. What should you do? (More than one answer choice may achieve the goal. Select the BEST answer.)

Options

  • AAdd one report variable for FontFamily Assign it with an expression to return the appropriate colors.
  • BFor each header text box, set the Color and FontSize properties by using the variables.
  • CFor each header text box, assign expressions to the FontFamily and FontSize properties. Add two report variables named FontFamily and FontSize. Assign them with expressions to return the appropriate colors. For each header text box, use expressions to set the FontFamily and FontSize properties by using the variables.
  • DAdd two Microsoft Visual C# functions to the code block of the report to implement FontFamily and FontSize functions. For each header text box, use expressions to set the FontFamily and FontSize properties by using the functions.

How the community answered

(52 responses)
  • A
    10% (5)
  • B
    15% (8)
  • C
    4% (2)
  • D
    71% (37)

Why each option

SSRS custom code functions allow centralized, reusable logic for dynamic font properties driven by report parameters, making them the best solution for per-business-unit font schemes.

AAdd one report variable for FontFamily Assign it with an expression to return the appropriate colors.

Adding only one variable for FontFamily ignores FontSize, which is also required by the font scheme, and the description incorrectly references color properties instead of font properties.

BFor each header text box, set the Color and FontSize properties by using the variables.

Setting Color and FontSize properties from variables omits FontFamily, which is a required part of the font scheme, making this an incomplete solution.

CFor each header text box, assign expressions to the FontFamily and FontSize properties. Add two report variables named FontFamily and FontSize. Assign them with expressions to return the appropriate colors. For each header text box, use expressions to set the FontFamily and FontSize properties by using the variables.

While report variables can store computed values, they are evaluated once per report scope and cannot be invoked with arguments like functions can, making them less flexible for per-business-unit font logic.

DAdd two Microsoft Visual C# functions to the code block of the report to implement FontFamily and FontSize functions. For each header text box, use expressions to set the FontFamily and FontSize properties by using the functions.Correct

Adding C# functions to the SSRS report code block creates a centralized, parameterizable implementation that can evaluate the business unit parameter and return the correct FontFamily and FontSize values. Each header text box then references these functions via expressions, ensuring consistent font scheme application across all headers. This approach is more maintainable and reliable than duplicating logic in individual expressions.

Concept tested: SSRS custom code functions for dynamic property expressions

Source: https://learn.microsoft.com/en-us/sql/reporting-services/report-design/custom-code-and-assembly-references-in-expressions-in-report-designer-ssrs

Topics

#report variables#dynamic font properties#SSRS expressions#parameterized formatting

Community Discussion

No community discussion yet for this question.

Full 70-466 Practice