Ok, I'm confused, and not using the components correctly. Can you have a look at what I am doing wrong in the attached demo?
OK, the simple answer is that because you have set an OnSelectSQL handler, the DataOutputFormatter never gets called. When TIBXScript encounters a select statement, it will either: call the OnSelectSQL handler if present, or call the DataOutputFormatter, if present, or otherwise throw an exception.
You have used a TIBDataset to show the results of the select query which is fine. However, you won't get any statistics from the DataOutputFormatter as it's never called.
TIBDataset never has had any direct way to get the performance statistics and I am not sure how meaningful they will be given that it doesn't necessarily fetch all records as once - unlike a DataOutputFormatter. However, there is a way of getting them:
TIBDatabase has a public property SelectStmtHandle: IStatement. This is the low level API handle. You can feed this to the class procedure TIBCustomDataOutput.ShowPerfStats(Statement: IStatement; Add2Log: TAdd2Log); in the unit IBDataOutput to format the current statistics and write them to the log. However, as dsiders has been pointing out to me, while this procedure works fine on Linux there seems to be a platform incompatibility with Windows.
This is a bug waiting to be fixed. In the meantime, if on Windows, you might fined it easier to just copy the code from this class procedure and replace all "%f" formatting codes with %u.