Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

 SQL Server Forums Profile | Active Topics | Members | Search | Forum FAQ Register Now and get your question answered!
 All Forums  Development Tools  Reporting Services Development  Reporting Service Issue Reply to Topic  Printer Friendly
Author  Topic

sridhar3004
Starting Member

34 Posts

 Posted - 07/13/2012 :  11:06:23 I've 4 levels of dataLevelType Dr Cr------------------------------------Level 1 Level 2 Level 3 Level 4A 5 10Level 4B 25 10Level 4C 15 0Level 4D 0 5Level 11 Level 22 Level 33 Level 44A 10 15Level 44B 5 30I've created a drill down report in SSRS and I want to show the difference of Dr & Cr values in either Dr or Cr column depending on which has the greater valueso in the above example for Level 4A, the value shown will be 0 in Dr and 5 in Cr since 10 > 5 and 10 -5 = 0for level B value of Dr will be 15 and Cr = 0and so on and so forthI've done all this in SSRS using the IIF condition to find out which is greater and then getting the value as shown belowEach level total depends on the sum of records below it. At each level the same logic as mentioned above is applied. i.e. the difference between Dr and Cr should be displayed in the column with the greater valueLevelType Dr Cr------------------------------------Level 1 20 0Level 2 20 0Level 3 20 0Level 4A 0 5Level 4B 15 0Level 4C 15 0Level 4D 0 5Level 11 0 30Level 22 0 30Level 33 0 30 Level 44A 0 5Level 44B 0 25So far everything is working fine.My only hiccup now is finding the grand total which should be total osLevel 1 + Level 11for grandtotal the Dr should be 20 + 0 = 20 and for Cr should be 0 + 30 = 30How do I total the group level 1 to arrive at the grand totalANy help will be appreciated.Thanks Sridhar

sridhar3004
Starting Member

34 Posts

 Posted - 07/16/2012 :  01:32:23 I've got the solution. There is a workaround to this by writing a piece of code Thanks againSridhar
Topic
 Reply to Topic  Printer Friendly Jump To: Select Forum General SQL Server Forums       New to SQL Server Programming       New to SQL Server Administration       Script Library       Data Corruption Issues       Database Design and Application Architecture SQL Server 2012 Forums       Transact-SQL (2012)       SQL Server Administration (2012)       SSIS and Import/Export (2012)       Analysis Server and Reporting Services (2012)       Replication (2012)       Availability Groups and DR (2012)       Other SQL Server 2012 Topics SQL Server 2008 Forums       Transact-SQL (2008)       SQL Server Administration (2008)       SSIS and Import/Export (2008)       High Availability (2008)       Replication (2008)       Analysis Server and Reporting Services (2008)       Other SQL Server 2008 Topics SQL Server 2005 Forums       Transact-SQL (2005)       SQL Server Administration (2005)       .NET Inside SQL Server (2005)       SSIS and Import/Export (2005)       Service Broker (2005)       Replication (2005)       High Availability (2005)       Analysis Server and Reporting Services (2005)       Express Edition and Compact Edition (2005)       Other SQL Server Topics (2005) SQL Server 2000 Forums       SQL Server Development (2000)       SQL Server Administration (2000)       Import/Export (DTS) and Replication (2000)       Transact-SQL (2000)       Analysis Services (2000)       MSDE (2000) Development Tools       ASP.NET       Reporting Services Development       Other Development Tools Site Related Forums       Site Related Discussions       Article Discussion       Poll Discussion       The Yak Corral Other Forums       SQL Server 6.5 \ SQL Server 7.0       Other Topics       MS Access       ClearTrace Support Forum Old Forums       CLOSED - General SQL Server       CLOSED - SQL Server 2005/Yukon  -------------------- Home Active Topics Frequently Asked Questions Member Information Search Page
 SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC
 This page was generated in 0.02 seconds.