You are on page 1of 4

c 

c

1.Explain the usage of expressions in creation of reports?

A - Expressions are commonly used to display field values and calculated values in a report. We create
more complex expressions by using functions or by combining field expressions with mathematical
operators to perform a calculation. We use expressions that allow us to dynamically control nearly every
aspect of reporting from control properties to data binding.

An expression is a short statement, written in code, which sets the value of a property. An expression
can set the value of a property based on just about any data available in the report: parameters, report
global values, fields in a dataset, and built-in functions.

2. What is the use of calculated field to the dataset?

A - An expression can be added as a calculated field to the dataset, and then used in a table as if it were
part of the original dataset.

3.What are global variables?

A - We can use global variables to build some basic diagnostics into reporting. We could also add these
variables to the report footer and use a parameter to hide or show them. That way, even in production,
the users can see a tidy, clean report, but we see the same report with all the extra information on it.

4. What are some global variables to keep track of number of pages in a report?

A - to keep track of the number of pages in a report, you can use the PageNumber and TotalPages global
variables to access the numbering that Reporting Services stores for you.

5. What are sub reports?

A - A sub report is a report that is embedded into another report. Sub reports can take parameters and
execute their own datasets. A key aspect to note is that a sub report in SSRS is actually just another
report (unlike some reporting tools, where a sub report is a special construct). In SSRS we can execute a
sub report on its own.
(.What is the difference between copying an expression and copying a cell?

A - Copying an expression does not copy the formatting to the destination cell. Copying a cell, by
contrast, also copies the formatting to the target cell.

7. How many global variables are available by default?

A - Six global variables are available to use. They are especially useful for embedding report information
in printed reports. Global variables are members of the Globals collection, in which Reporting Services
tracks information unique to a report. We can display this information in the report by including a global
variable in an expression placed in a textbox.

8.Explain ReportItems Collection in SSRS.

A - The ReportItems collection contains the report͛s textboxes as objects. We can use a report item
expression to display the value of a textbox in a separate textbox or to use a textbox͛s value as part of a
separate calculation. Report item expressions are similar to global variables because they are evaluated
by Reporting Services after processing completes but before rendering.

9.Explain Aggregate Functions in SSRS.

A - In the report body, an aggregate function operates on a set of rows defined by an expression, such as
a field, and returns a value. Usually, an aggregate function operates on numeric values, but some
aggregate functions work with string values. In the page header and page footer, an aggregate function
can operate only on report item expressions.

10.Name some of the Aggregate Functions in SSRS.

A - Aggregate: Aggregate values as defined by the data provider

Avg: Average nonnull numeric values in the set

Count: Count values in the set

CountDistinct: Count the distinct values in the set

CountRows: Count the number of rows in the set

First: Get the first value in the set


Ëast: Get the last value in the set

Max: Get the highest value in the set

Min: Get the lowest value in the set

Sum: Total the numeric values in the set

Var: Find the variance of all non null numeric values in the set

11.Explain syntax Function and RunningValue function.

A - Most aggregate functions use the syntax Function (Expression, Scope), but the RunningValue
function is constructed using the following syntax: RunningValue (Expression, Function, Scope). In this
function, Expression cannot itself contain an aggregate function; Function is the aggregate function to
apply (which cannot be RunningValue or RowNumber); and Scope is the name of a data region or a
grouping in a data region and is contained within quotation marks.

12. Explain format function while using Aggregate Functions in a Textbox.

A - When using an expression to concatenate a string value with a numeric value, like an aggregate, we
need to wrap the Format function around the aggregate function to convert the numeric value to a
string and apply the proper formatting.

The syntax for the Format function is Format(Expression, FormatString), where FormatString is the same
string you would use in the Format property.

13. Explain some of the uses of Expressions to Change an Object͛s Behavior.

A - display the results of calculations in a report control appearance, such as font color control behavior,
such as sort order set many of the properties in the Properties window instead of a single value

14. Explain Conditional Formatting while using expressions

A - Conditional formatting is used to change the font or background color of an item based on the result
of evaluating a Boolean expression, which returns either True or False. Often, conditional formatting is
used to identify values, known as exceptions that fall outside a specified range to make them easier to
locate in a big report. It can also be used for conditional formatting to create rows with alternating
colors.
15. Explain Sorting while using expressions

A - The sort order of rows in the table is determined by the order of rows in the dataset. We can use an
ORDER BY clause in the query if we want to control the sort order on the database server. Also we can
use a field expression for setting the sort order in Table Properties to change the query͛s default sort
order using the Report Server. If we need to sort rows by a value that is not in the dataset, we can use
an expression.

1(. What is a report item expression?

A - A value in the textbox, if derived from a field expression, such as the margin example discussed
earlier in this section, doesn͛t come directly from the dataset but is stored there to be displayed in the
report or for use in another expression. You can think of the textbox as not just a display item, but also
as a holding area for a value that can be used as part of another calculation.

You might also like