Specify color for each group in SSRS Report

Specify color group SSRS Report
Highlight the row on the table of the report – > properties -> Background -> expression -> paste the following code.

=IIF(RunningValue(Fields!GROUP_DESC.Value,CountDistinct, Nothing) MOD 2 = 1, "WhiteSmoke", "White")

 

 

 

Specify color for each group in SSRS Report was last modified: October 1st, 2017 by Justin Antony

Find SQL Server Edition Bit Version Special Pack and Version Number Details using Query

Find SQL Server Edition using Query
You can find using the following Query

SELECT SERVERPROPERTY('edition') AS SQLSERVER_BIT_VERSION,
SERVERPROPERTY('productlevel') AS SPECIAL_PACK
,SERVERPROPERTY('productversion') AS VERSION_NUMBER
OR
SELECT @@VERSION

 

Find SQL Server Edition Bit Version Special Pack and Version Number Details using Query was last modified: October 1st, 2017 by Justin Antony

Slicer control on a multiple data source pivot excel – 1004 Runtime Error in VBA Script.

Slicer control multiple data source pivot excel VBA Script
Using the below code you can control the Slicer_Name2 from Slicer_Name1 belongs to different data source of a pivot Excel.

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim sc1 As SlicerCacheLevel
Dim sc2 As SlicerCacheLevel
Dim sc3 As SlicerCache
Dim sc4 As SlicerCache
Dim ST1 As SlicerItem
Dim ST2 As SlicerItem
Dim sc As SlicerCache
Dim si As SlicerItem
Dim list As Variant
Application.ScreenUpdating = False
Application.EnableEvents = False
Set sc3 = ActiveWorkbook.SlicerCaches("Slicer_Name1")
Set sc4 = ActiveWorkbook.SlicerCaches("Slicer_Name2")
For Each sc1 In ThisWorkbook.SlicerCaches("Slicer_Name1").SlicerCacheLevels
For Each ST1 In sc1.SlicerItems
For Each sc2 In ThisWorkbook.SlicerCaches("Slicer_Name2").SlicerCacheLevels
For Each ST2 In sc2.SlicerItems
If ST1.Selected = True And ST1.Value = ST2.Value Then
If IsEmpty(list) Then
list = Array(ST2.Name)
Else
ReDim Preserve list(UBound(list) + 1)
list(UBound(list)) = ST2.Name
End If
sc4.VisibleSlicerItemsList = list                        
Exit For
End If
Next
Next
Next        
Next     
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Slicer control on a multiple data source pivot excel – 1004 Runtime Error in VBA Script. was last modified: October 1st, 2017 by Justin Antony