How to query the database to create a report based on user input variables in a form?
I think you pass some arguments when you redirect the page to another page.
You can pass arguments like this way.. 

$form_state['redirect'] = array(
  'node/123',
  array(
    'query' =&gt; array(
      'foo' =&gt; 'bar',
    ),
    'fragment' =&gt; 'baz',
  ),
);


Or You also can use drupal_goto() like this

drupal_goto('your_url', array('query'=&gt;array(
'variable_name1'=&gt;'variable_value1',
'variable_name2'=&gt;'variable_value2',
'variable_name3'=&gt;'variable_value3',
...... ...
)));


You can check below links for more information.
https://api.drupal.org/api/drupal/includes!form.inc/function/drupal_redirect_form/7
https://www.drupal.org/node/291680
https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_goto/7

Note : Ignore to use this options.
And last options is $_SESSION variable. you can store your data in session and after  getting data from session in your destination page you unset that particular  session data.