It seems that you should have told us that you modified PayrollStatementGenerationQuery (explaining what exact changes you made could be useful too) and now you don't see your new datasource in the selection for filter, when you run Payroll > Pay statement processing > Generate pay statement. Please make sure you provide such a description next time.
Most likely you're looking at previously saved query, therefore you should delete it from usage data. Go to User options, press Usage data, switch to All usage data and delete records with Element name = PayrollPayStarementGeneration (which is the class which is called when you click Generate pay statement).





