DirectSQL not showing all data


I am using SQLDirect to create my excel files, my template have a Pivot TABLE, so the SQL will fill the Data worksheet with the result.

The Data Worksheet have  only 24 rows of data, but the SQL result on IBExpert ( I am using firebird ) shows 107 records.

I am following the SQLDirect sample, But I am trying to undersand, why the data worksheet doesn´t have the same result as I have on ibexpert.

Is there something to check out?

José Carlos.


Can you try setting the last parameter of add connection to TRecordCountMode.SlowCount ?

      function (const sql: string): TDataSet   //We need to return a new TDataSet here, FlexCel will free it.
        ds: TADODataSet;
        ds := TADODataSet.Create(nil);
        ds.Connection := ReportData.ADOConnection;
        ds.CommandText := sql;

        Result := ds;

I am not sure on what components you are using, but they might not be returning the right record count. If you are using FireDac, instead of using SlowCount as said above, you might change RecordCountMode (
uestions_(FireDAC)  )

If htis is using IB components directly, then just use SlowCount.

For more information please amke sure to read the section:
About RecordCount in DataSets
in UsingFlexCelReports.pdf

Let me know if this fixes it.

It worked, I got all records adding SlowCount

José Carlos.