Quick Report Dataset Assignment


I'm very new to Quick Report components and I'm having great difficulty in
printing a queried dataset.  I setup the TQuery component and query the
database.  I then set the QuickReport->Dataset = TQuery->Dataset.  Then I
perform a QuickReport->Preview to see the results.  The probelm is that I
see the entire database, not the queried dataset.  What am I doing wrong?
Here is a snipit of code:

SQLQuery = new TQuery( MainWindowForm );
SQLQuery->DatabaseName = "WhatsGoingOn";
SQLQuery->DataSource = MainWindowForm->WhatsGoingOnDataSource;
SQLQuery->RequestLive = false;
SQLQuery->SQL->Add( SQLQueryStr );
QuickReportForm->QuickReport->DataSet = SQLQuery->DataSource->DataSet;
if ( SQLQuery->Active )
   QuickReportForm->QuickReport->DataSet = SQLQuery->DataSource->DataSet;

Thanks in advance!

Court Sailor