Issue 76297 - com.sun.star.sheet.DataPilotDescriptor - IgnoreEmptyRows
Summary: com.sun.star.sheet.DataPilotDescriptor - IgnoreEmptyRows
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.2
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2007-04-12 06:44 UTC by Oliver Brinzing
Modified: 2017-05-20 11:13 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
com.sun.star.sheet.DataPilotDescriptor - IgnoreEmptyRows (21.83 KB, application/vnd.oasis.opendocument.spreadsheet)
2007-04-12 06:45 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2007-04-12 06:44:23 UTC
Hi,

the property "IgnoreEmptyRows" from com.sun.star.sheet.DataPilotDescriptor
handles rows containing formulars always as not empty ... 

Please have a look at the attachment ...

Maybe one can add some options like we have for
oRange.queryContentCells / oRange.queryFormulaCells ...

Please have a look at http://qa.openoffice.org/issues/show_bug.cgi?id=57431 too

Oliver
Comment 1 Oliver Brinzing 2007-04-12 06:45:15 UTC
Created attachment 44368 [details]
com.sun.star.sheet.DataPilotDescriptor - IgnoreEmptyRows
Comment 2 Rainer Bielefeld 2007-07-03 18:38:12 UTC
I checked with "2.2.1  Multilingual German version WIN XP: [680m18(Build9161)]"
and can confirm the problem. 
Lines 8 and 14 of "IgnoreEmptyRowsDemo.ods" contain formulas, so that the Data
Pilot creates unexpected "(Empty) sum results". When you delete the formulas,
the "(Empty) sum results" disappear after refresh.
Comment 3 frank 2007-07-06 11:08:57 UTC
Hi Niklas,

as Enhancement for you.

Frank
Comment 4 Oliver Brinzing 2009-05-19 12:25:59 UTC
verified in oo 3.1
Comment 5 Oliver Brinzing 2011-01-28 18:06:47 UTC
playing with the datapilot i found 2 workarounds for the issue:

REM  *****  Apply a Filter  *****
OPTION EXPLICIT
Sub HideEmptyRows()
	Dim oDoc as Object
	Dim oSheet as Object
	Dim oDataPilot as Object
	Dim aFilterFields(0) as new com.sun.star.sheet.TableFilterField
	Dim aNoArgs(0) as new com.sun.star.sheet.TableFilterField

	oDoc = ThisComponent
	oSheet = oDoc.getSheets().getByIndex(0)
	oDataPilot = osheet.getDataPilotTables().getByIndex(0)

	aFilterFields(0).Field        = 1
	aFilterFields(0).IsNumeric    = False
	aFilterFields(0).Operator     = 
                                  com.sun.star.sheet.FilterOperator.NOT_EQUAL
	aFilterFields(0).StringValue = ""

	oDataPilot.getFilterDescriptor().setFilterFields(aFilterFields())
	oDataPilot.refresh()
End Sub

REM  *****  Exclude from Sort  *****
OPTION EXPLICIT
Sub HideEmptyRows()
	Dim oDoc as Object
	Dim oSheet as Object
	Dim oDataPilot as Object
	Dim oRowField as Object
	Dim oItem as Object
	Dim i as Integer
	Dim j as Integer

	oDoc = ThisComponent
	oSheet = oDoc.getSheets().getByIndex(0)
	oDataPilot = osheet.getDataPilotTables().getByIndex(0)

	For i = 0 To oDataPilot.getRowFields().getCount()-1
		oRowField = oDataPilot.getRowFields().getByIndex(i)
		'Msgbox "RowField: " & oRowField.Name
		'caution: oo will crash if one tries to hide items from "Data" !
                If oRowField.Name <> "Data" Then
			oItem = oRowField.Items()
			For j = 0 To oItem.getCount()-1
				'MsgBox i & " " & j & " " & oItem.getByIndex(j).Name
				If oItem.getByIndex(j).Name = "" Then
					oItem.getByIndex(j).isHidden = True
				EndIf
			Next j
		EndIf
	Next i
End Sub
Comment 6 Marcus 2017-05-20 11:13:31 UTC
Reset assigne to the default "issues@openoffice.apache.org".