I have done some more digging and I have some additional details.
To test the exact same query that the report is using outside of Crystal Reports I added the query using the ODBC data source to an Excel document. The Excel document printed out the date/time values correctly. With further digging it turns out that Excel was using SQLGetData after SQLFetch to retrieve the individual values. Crystal Reports used only SQLFetch. I have attached the ODBC trace from Excel in case that is somehow useful here. odbc-trace-mariadb-excel.log
The ODBC traces I posted yesterday show essentially the same output for the MariaDB ODBC connector as for the MyODBC connector, after initializing and binding everything they call SQLFetch once for each row. Other applications, such as Excel in this case, call SQLGetData following SQLFetch.
I did some more digging and built a debugging version of the MariaDB ODBC connector to trace further. I added statements to output when the functions in ma_statement.c are entered. I also printed out the string representation of (SQL_TIMESTAMP_STRUCT *)DataPtr at the end of the MADB_CopyMadbTimestamp function in ma_helper.c. The output (after the initial initialization and binding) looks like this for each row:
MADB_StmtFetchScroll
MADB_StmtFetch
MADB_FixFetchedValues
MADB_CopyMadbTimestamp Timestamp: 2018-06-12 15:11:37.0000
This is the correct value so the query and SQLFetch are retrieving the correct date/time values from the database, and MADB_CopyMadbTimestamp is correctly taking them from the internal buffer bound to the query result and populating DataPtr. It seems to me that when called from MADB_StmtFetch (by way of MADB_FixFetchedValues) the buffer that the SQL_TIMESTAMP_STRUCT structure is being populated into is somehow not getting linked up with what the client application is reading.
This same debugging output during the query from Excel looks like this for each row:
MADB_StmtFetchScroll
MADB_StmtFetch
MADB_FixFetchedValues
ResetDescIntBuffers
MADB_StmtGetData
MADB_StmtGetData Timestamp: 2018-06-12 15:11:37.0000
I added the timestamp output in MADB_StmtGetData, that is populating the result correctly as it is fetching the values from the result set. This doesn't go through MADB_CopyMadbTimestamp.
I get a little lost from here in the maze of buffers and bindings so I'm not really sure how to trace it further, but I hope this helps narrow it down. Everything I'm seeing seems to point to MADB_CopyMadbTimestamp not putting the result where the client application is expecting it, resulting in this case in NULL values on the report.
Do you happen to know what values are stored in database for those fields? all different?
The best thing would be to provide ODBC trace of the report generation. Trace of successful report with MySQL's connector could also help in some cases.
Is that correct that you tried with both 3.0.3 and 3.0.5 versions?