nerdexam
Microsoft

70-466 · Question #2

You are developing a SQL Server Reporting Services (SSRS) report that renders in HTML. The report includes a dataset with fields named Description, Price, and Color. The report layout includes a table

The correct answer is B. Set the SortExpression property to =Fields!Price.Value for the Price text box.. Enabling interactive column sorting in an SSRS HTML report requires setting the SortExpression property on the column header text box to the target field value.

Build reports

Question

You are developing a SQL Server Reporting Services (SSRS) report that renders in HTML. The report includes a dataset with fields named Description, Price, and Color. The report layout includes a table that displays product details and also includes columns named Description, Price, and Color. You need to modify the report so that users can sort products by the Price column. What should you do?

Exhibit

70-466 question #2 exhibit

Options

  • AAdd a custom action to the Price text box.
  • BSet the SortExpression property to =Fields!Price.Value for the Price text box.
  • CIn the Expression dialog box for the Price text box, enter the =SortBy Fields!Price.Value expression.
  • DSet the SortExpression value to =Fields!Price.Description for the Price text box.

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    90% (27)
  • D
    3% (1)

Why each option

Enabling interactive column sorting in an SSRS HTML report requires setting the SortExpression property on the column header text box to the target field value.

AAdd a custom action to the Price text box.

Custom actions configure drillthrough navigation or hyperlink behavior on a text box, not interactive data sorting.

BSet the SortExpression property to =Fields!Price.Value for the Price text box.Correct

Setting the SortExpression property to =Fields!Price.Value on the Price column text box activates the interactive sort feature in SSRS HTML rendering, adding a clickable sort toggle to the column header. When a user clicks the header at runtime, the report engine re-executes the sort on the dataset using the specified field, toggling between ascending and descending order.

CIn the Expression dialog box for the Price text box, enter the =SortBy Fields!Price.Value expression.

=SortBy is not a valid built-in function in the SSRS expression language; no such function exists for sorting datasets.

DSet the SortExpression value to =Fields!Price.Description for the Price text box.

Fields!Price.Description is not a valid member reference for a numeric Price field - the correct member for sorting is Value, not Description.

Concept tested: SSRS interactive sort via SortExpression property

Source: https://learn.microsoft.com/en-us/sql/reporting-services/report-design/interactive-sort-data-regions-and-points-report-builder-and-ssrs

Topics

#interactive sort#SortExpression property#table columns#HTML rendering

Community Discussion

No community discussion yet for this question.

Full 70-466 Practice