To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=76297





------- Additional comments from brinz...@openoffice.org Fri Jan 28 18:06:47 
+0000 2011 -------
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

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sc.openoffice.org
For additional commands, e-mail: issues-h...@sc.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to