Microsoft SQL Server 2008 R2 Specifications Page 190

  • Download
  • Add to my manuals
  • Print
  • Page
    / 236
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 189
170 CHAPTER 9 Reporting Services Enhancements
Another option is to use the RenderFormat global variable with the IsInteractive member
to set the conditions of a property. For example, let’s say you have a report that displays sum-
marized sales but also allows the user to toggle a report item to display the associated details.
Rather than export all of the details when the export format is not interactive, you can easily
omit those details from the rendered output by using the following expression in the Hidden
property of the row group containing the details:
=iif(RenderFormat.IsInteractive, False, True)
Page Numbering
Speaking of global variables, you can use the new Globals!OverallPageNumber and
Globals!OverallTotalPages variables to display the current page number relative to the entire
report and the total page count, respectively. You can use these global variables, which are
also known as built-in elds, in page headers and page footers only. As explained later in
this chapter in the “Pagination Properties” section, you can specify conditions under which
to reset the page number to 1 rather than incrementing its value by one. The variables
Globals!PageNumber and Globals!TotalPages are still available from earlier versions. You can
use them to display the page information for the current section of a report. Figure 9-5 shows
an example of a page footer when the four global variables are used together.
FIGURE 9-5 Global variables for page counts
The expression to produce this footer looks like this:
="Section Page " + CStr(Globals!PageNumber) + " of " + CStr(Globals!TotalPages) +
" (Overall " + Cstr(Globals!OverallPageNumber) + " of " +
CStr(Globals!OverallTotalPages) +")"
Read/Write Report Variable
Another enhancement to the expression language is the new support for setting the value
of a report variable. Just as in previous versions of Reporting Services, you can use a report
variable when you have a value with a dependency on the execution time. Reporting Services
stores the value at the time of report execution and persists that value as the report continues
to process. That way, as a user pages through the report, the variable remains constant even if
the actual page rendering time varies from page to page.
By default, a report variable is Read Only, which was the only option for this feature in the
previous version of Reporting Services. In SQL Server 2008 R2, you can now clear the Read-
Only setting, as shown in Figure 9-6, when you want to be able to change the value of the
report variable during report execution.
Page view 189
1 2 ... 185 186 187 188 189 190 191 192 193 194 195 ... 235 236

Comments to this Manuals

No comments