Go Back   CORTEX Forums > Vendors and Service Provders > Major Vendors > Microsoft Forum > Microsoft News and Views
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read

Report Variables and Group Variables in Reporting Services 2008

This is a discussion on Report Variables and Group Variables in Reporting Services 2008 within the Microsoft News and Views forums, part of the Microsoft Forum category; Note: this posting provides an overview of when to consider using Report Variables and/or Group Variables for general report design patterns. There is also a detailed blog posting that describes ...


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 25th November 2009, 01:49 PM   #1
News Bot
 
Join Date: Nov 2007
Posts: 15,085
Latest News Headlines is on a distinguished road
Post Report Variables and Group Variables in Reporting Services 2008

Note: this posting provides an overview of when to consider using Report Variables and/or Group Variables for general report design patterns. There is also a detailed blog posting that describes a particular report design pattern (custom aggregation) report authors may have been using in Reporting Services 2005, which requires group variables in Reporting Services 2008.

On-Demand Report Processing

Reporting Services 2008 features an on-demand report processing engine. This on-demand architecture has a number of key advantages over the processing engine design that existed in previous releases. The most significant benefits are improvements to report engine scalability and performance (you can read a bit more about it here). Because of this fundamental change from previous versions, there are some specific design patterns that have changed.

The new processing engine in Reporting Services 2008 still retrieves datasets upfront, but only pre-computes certain invariants, such as grouping, sorting, filter expressions, aggregates, subreport parameters and queries. Everything else are "on-demand" evaluated expressions at the time a particular page is rendered; most notably, textbox values, and style expressions.

As a result, the internal execution order of expressions in Reporting Services 2008 might be vastly different compared to previous releases. If your reports make custom code / custom assembly calls with side-effects relying on undocumented expression evaluation order (e.g. accumulating state via an expression in a table detail section, and relying on the state being fully populated in a "later" expression), the report may not work as before when upgrading it to Reporting Services 2008. Report and group variables were introduced to address this scenario.

Report and Group Variables

In Reporting Services 2008, one can declare variables that are global throughout the report or local to particular group scopes and refer to them in expressions. Report and group variables can only be set/initialized once and have a read-only semantics.

Typical use cases for variables include:
  • Caching values / expensive calculations:
    Report/group variables can be used to make an expensive call to an external assembly once, cache the result, and then reference the variable value from other expressions in the report (to avoid re-evaluating the original expression repeatedly during on-demand report processing).
  • Time-dependent calculations:
    For example, retrieve a currency conversion value and store it in a report/group variable to be applied consistently during the lifetime of the rendering session.
  • Specific execution-order semantics:
    Achieve particular expression execution order semantics that is independent of the rendering extension used later for generating the report output. This use case is not as common, but also a bit more complex. It is discussed in detail in another blog posting titled Using Group Variables In Reporting Services 2008 for Custom Aggregation. That posting also includes sample reports and step-by-step instructions.
-- Robert




More from the SQL Server Reporting Services Team Blog ...
Latest News Headlines is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2008 R2 November CTP – What’s New In Reporting Services? Latest News Headlines Microsoft News and Views 0 25th November 2009 01:49 PM
SQL Server 2008 R2 August CTP – What’s New In Reporting Services? Latest News Headlines Microsoft News and Views 0 25th November 2009 01:49 PM
SQL Server 2008 SP1 and Report Builder Update Latest News Headlines Microsoft News and Views 0 25th November 2009 01:49 PM
Reporting Services Information Aggregator Latest News Headlines Microsoft News and Views 0 25th November 2009 01:49 PM
An Analysis Services 2008 nugget Darren Gosbell Random Procrastination 0 23rd June 2009 07:30 PM


All times are GMT +11. The time now is 05:53 AM.

© The Business Intelligence Group

Search Engine Optimization by vBSEO