Here is a snapshot

cxDBPivotGrid

Tell me how to cycle through all the rows of the specified column.

Rather, the question of a bunch cxDBPivotGrid + cxPivotGridDrillDownDataSet. It is required to cycle through a programmatically follow up cxDBPivotGrid, while inside the loop it is required to run through the records of the associated cxPivotGridDrillDownDataSet а и обрабатывать данные этого самого cxPivotGridDrillDownDataSet and also in a loop.

Those. in the loop, you need to allocate cxDBPivotGrid`s records so that cxPivotGridDrillDownDataSet generates a set of its records? or are there simpler ways?

Where to begin?

Now while I try to get the idea of ​​editing, basic concepts, etc. TcxDBPivotGrid + cxPivotGridDrillDownDataSet did not work until this point. In principle, a cxGrid is attached to cxPivotGridDrillDownDataSet, and by cxGrid I can already run.

    1 answer 1

    Getting started:

     var I: Integer; s: string; begin cxDBPivotGrid1.BeginUpdate; try for I := 0 to Pred(cxDBPivotGrid1.ViewData.RowCount) do begin if s = '' then s := cxDBPivotGrid1.ViewData.CellsAsText[i, 0] else s := s + sLineBreak + cxDBPivotGrid1.ViewData.CellsAsText[i, 0]; end; ShowMessage(s); finally cxDBPivotGrid1.EndUpdate; end; end; 

    Now the second question. CxDBPivotGrid are bound to cxPivotGridDrillDownDataSet + cxGrid and the data in the grid is displayed below. How to make a second (internal) loop on cxPivotGridDrillDownDataSet for each row of PivotGridʻa?

    For clarity, such an example: picture

    1. Go to the string in cxDBPivotGrid
    2. We process all records from cxPivotGridDrillDownDataSet

    Something like master-detail is obtained.