![]() |
|
Low-impact SQL Server auditing of all user activity and data changes
|
|
By: Rob Fisch | Read Comments (3) | Related Tips: > Reporting Services Drill Through |
Problem
One great feature of Reporting Services is the ability to drill through to secondary reports. This is pretty straightforward to do, but the built-in option in Reporting Services is an all or nothing approach. Sometimes there is a need to drill through to secondary reports based on certain data conditions, but you do not want a link for every row only certain ones. How can you provide a link for some data records but not others?
Solution
The solution is to use if IIF() function within the report navigation expression window.
Let's say you have a report showing a summary of sales in several divisions, but you only want to drill through to details (a secondary report) with records having to do with the Eastern division. All other divisions will report at the summary level without a drill though report.
To create the drill through navigation, right-click on the Properties of the textbox and select the Navigation tab.

Instead of choosing a report from the dropdown, click on the fx button to open the navigation window and use the Reporting Services expression editor.
To conditionally present a link, use the IIF() function.

The IIF() statement has the following format:
=IIF(Expression to evaluate,
what-to-do when the expression is true,
what-to-do when the expression is false)
There are a few rules and notes to follow.
Put together, here's what to do:
Use the parameters button as you normally would with drill through reports.
More notes:
Next Steps
| Wednesday, March 18, 2009 - 3:41:58 AM - parwinder | Read The Tip |
|
Hi I am facing a problem regarding use of expression for drill through reports. I have appended ".rdl" at the end of report name, so it is working on WSS site , but it is giving error in designer. Do you have any solution for the same? |
|
| Sunday, June 02, 2013 - 10:36:30 PM - Ned Bakelman | Read The Tip |
|
This is awesome. Thank you very much.
Ned |
|
| Friday, June 14, 2013 - 2:44:24 AM - Naveen Khanna | Read The Tip |
|
Hi,
I was searching for the same solution from last two weeks. Today I found it and its realy gud one.Thanks Rob. |
|
|
privacy | disclaimer | copyright | advertise | about authors | contribute | feedback | giveaways | user groups Some names and products listed are the registered trademarks of their respective owners. Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com |