Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Empty Pivot Chart

Is there a quick and easy way of programmatically checking to see if an OLAP
Pivot table or associated chart has no data in it

Thanks in advance,

Tony


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Empty Pivot Chart

I use this when printing pivot charts:

If ActiveChart.SeriesCollection(1).Points.Count = "" Then
'do nothing
Else
ActiveWindow.SelectedSheets.PrintOut
End If


Tony wrote:
Is there a quick and easy way of programmatically checking to see if an OLAP
Pivot table or associated chart has no data in it

Thanks in advance,

Tony




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Empty Pivot Chart

Thank you for that. Unfortunately this doesnt work for me.

I think it becasue there are Dimensions and Series on the chart but my
current selections have filtered out all the data e.g. selecting Saturday
from a DOW dimension when data only exists for Mon - Friday.

I need some indication that my selection criteria does not return any
results


"Debra Dalgleish" wrote in message
...
I use this when printing pivot charts:

If ActiveChart.SeriesCollection(1).Points.Count = "" Then
'do nothing
Else
ActiveWindow.SelectedSheets.PrintOut
End If


Tony wrote:
Is there a quick and easy way of programmatically checking to see if an

OLAP
Pivot table or associated chart has no data in it

Thanks in advance,

Tony




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Empty Pivot Chart

Perhaps you could use the GetPivotData function on the worksheet, to
check the total in one of the measures. For example, in a cell named
DataCheck:
=GETPIVOTDATA("[Measures].[Sum Of Total ]",$A$5)

Then, check that cell in the code:

Dim rngCheckData As Range
Set rngCheckData = ActiveWorkbook.Names("DataCheck").RefersToRange

If IsError(rngCheckData.Value) Then
MsgBox "No data"
Else
Sheets("Chart1").PrintPreview
End If


Tony wrote:
Thank you for that. Unfortunately this doesnt work for me.

I think it becasue there are Dimensions and Series on the chart but my
current selections have filtered out all the data e.g. selecting Saturday
from a DOW dimension when data only exists for Mon - Friday.

I need some indication that my selection criteria does not return any
results


"Debra Dalgleish" wrote in message
...

I use this when printing pivot charts:

If ActiveChart.SeriesCollection(1).Points.Count = "" Then
'do nothing
Else
ActiveWindow.SelectedSheets.PrintOut
End If


Tony wrote:

Is there a quick and easy way of programmatically checking to see if an


OLAP

Pivot table or associated chart has no data in it

Thanks in advance,

Tony




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html






--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicating Pivot Chart / Changing Pivot Chart data range BillG Excel Discussion (Misc queries) 4 February 25th 10 02:15 PM
XL2007: Empty pie chart GeoBrooks Charts and Charting in Excel 4 February 12th 09 01:59 PM
Chart empty with new data in the dynamic range chart. Feejo Excel Discussion (Misc queries) 16 January 3rd 08 10:03 PM
empty lines in pivot table Terri Excel Discussion (Misc queries) 0 February 28th 07 08:34 PM
Empty Chart Values [email protected] Excel Worksheet Functions 0 September 3rd 06 05:31 AM


All times are GMT +1. The time now is 11:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"