TOC : Script API > JavaScript > JavaScript API > Component > Band > GroupHeaderBand > Method >

 

GetDataSetRowCount

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > Component > Band > GroupHeaderBand > Method >

 

GetDataSetRowCount

 

 

Gets the number of total rows of the given data set.

 

 

 

Prototype :

 

integer GetDataSetRowCount

(

        [ string DataSetPath ]

)

 

 

 

Arguments :

 

DataSetPath

DataSet Path in the form of "ODI name.dataset name"

can be omitted or set to null or ""

 

 

 

Reference :

 

If dataset path is omitted or set to null or "", the dataset path of the band will be applied by default.

 

If call GetDataSetRowCount with dataset path in a data band having group header/footer bands, it will returns the number of rows actually bound for each group, not the total number of dataset rows.

 

For example, here is a data set with a total row of 6.

 

If a data band and its group header/footer bands (grouping field is member_card) are bound as below:

 

 

GetDataSetRowCount function in the data band returns 3, 2, 1 in sequence.

 

GetDataSetRowCount function in the group header/footer returns 3 (Bronze, Normal, Silver).

 

 

 

Example :

 

//ODI name : Sample, dataset name : Orders

 _TraceLn(This.GetDataSetRowCount("Sample.Orders"));

 

//ODI name can be omitted

 _TraceLn(This.GetDataSetRowCount("Orders"));

 

//Dataset path can be omitted or set to null or ""

  _TraceLn(This.GetDataSetRowCount());

  _TraceLn(This.GetDataSetRowCount(null));

  _TraceLn(This.GetDataSetRowCount(""));

 

 

 

Available Events :

 

OnBind,  OnStartBind