Myriad_Rocker
Board Regular
- Joined
- Dec 1, 2004
- Messages
- 67
I've built a report that has a Summary page and a Detail page. The data set is a report by Retailer and has various other things on it. It has drop downs at the top where you can select various things and be able to whittle down the results. As you select things, the pivot tables updates accordingly.
All is well in 2003 on the Detail page. But when doing the same things (selecting a Retailer from a dropdown), the pivot moves up an entire row. This causes my pane freezing to freeze at the wrong spot. Not only that but it turns my first cell black. I don't get that at all.
Here's some pics...
2003 - Initial load up - Everything is just fine.
2003 - After Selection - Again, everything is just fine.
2010 - Initial load up - Everything is just fine.
2010 - After Selection - It goes nasty
So...I do get that SOMETHING is happening when the pivot is refreshed...but what, I do not know. Because I'm filtering on Retailer and displaying it, I have it twice in my data source. Here's some code...
All is well in 2003 on the Detail page. But when doing the same things (selecting a Retailer from a dropdown), the pivot moves up an entire row. This causes my pane freezing to freeze at the wrong spot. Not only that but it turns my first cell black. I don't get that at all.
Here's some pics...
2003 - Initial load up - Everything is just fine.
2003 - After Selection - Again, everything is just fine.
2010 - Initial load up - Everything is just fine.
2010 - After Selection - It goes nasty
So...I do get that SOMETHING is happening when the pivot is refreshed...but what, I do not know. Because I'm filtering on Retailer and displaying it, I have it twice in my data source. Here's some code...
Code:
Private Sub combo_Retailer_Change()
If Application.EnableEvents = False Then Exit Sub Else
Dim MyRange As Range
Dim pt As PivotTable
Dim ws As Worksheet
Dim pt2 As PivotTable
Dim ws2 As Worksheet
Dim pi As PivotItem
Dim pi2 As PivotItem
Set ws = Sheets("Zone Voids Report Summary")
Set MyRange = Worksheets("Monthly VOID KPI Report").Range("ActiveItems_Retailer")
Set pt = ws.PivotTables("Pvt_Summary")
Set ws2 = Sheets("Zone Voids Report Detail")
Set pt2 = ws2.PivotTables("Pvt_Detail")
Application.EnableEvents = False
Application.ScreenUpdating = False
With pt.PivotFields("Retailer")
If ActiveSheet.combo_Retailer.Value = "(All)" Then
.CurrentPage = "(All)"
Else
For Each pi In .PivotItems
If pi.Value = ActiveSheet.combo_Retailer.Value Then
.CurrentPage = pi.Value
End If
Next
End If
End With
Sheets("Monthly VOID KPI Report").Select
Sheets("Monthly VOID KPI Report").Calculate
Sheets("Zone Voids Report Detail").Select
With pt2.PivotFields("Retailer Filter")
If ActiveSheet.combo_Retailer.Value = "(All)" Then
.CurrentPage = "(All)"
Else
For Each pi2 In .PivotItems
If pi2.Value = ActiveSheet.combo_Retailer.Value Then
.CurrentPage = pi2.Value
End If
Next
End If
End With
Application.EnableEvents = True
Sheets("Zone Voids Report Summary").combo_Retailer.Value = Sheets("Zone Voids Report Detail").combo_Retailer.Value
'Sheets("Zone Voids Report Summary").combo_BottlerSystem.List = GetUniques(MyRange)
'Sheets("Zone Voids Report Detail").combo_BottlerSystem.List = GetUniques(MyRange)
FormatPainterforGapfromDetail
Application.ScreenUpdating = True
End Sub