Forum Discussion
Dim destinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("""")
Dim sourceDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula(""Filtermembers(A#Account1, A#Account2)"")
If sourceDataBuffer.DataBufferCells.Count > 0 Then 'if no records in the data buffer don't run
'create a data buffer that will fill with the source cells during the loop below
Dim resultDataBuffer As DataBuffer = New DataBuffer
'loop through the cells in the databuffer
For Each sourceCell As DataBufferCell In sourceDataBuffer.DataBufferCells.Values
If (Not sourceCell.CellStatus.IsNoData) Then 'Don't waste performance if there aren't any source data cells.
Dim resultCell As New DataBufferCell(sourceCell)
resultCell.CellAmount = 0
resultcell.CellStatus = DataCellStatus.CreateDataCellStatus(True, False)
resultDataBuffer.SetCell(api.SI,resultCell,False)
End If
Next
api.Data.SetDataBuffer(resultDataBuffer,destinationInfo)
End If
Related Content
- 2 years ago
- 7 months ago