I just want the query, not the 50 items that appear on the screen. With the query, I can hit the database and get ALL the values associated with it to populate a chart.
Take a look at CollectionDatasource#getCompiledLoadContext method. We use it to load data for TablePrintFormAction of reports add-on.
Got it. Thanks!