public function buildReportInputForm($reportUri, $targetRoute = null, $options = array()) {
        //Handle the options array
        $routeParameters = (isset($options['routeParameters']) && null != $options['routeParameters']) ? $options['routeParameters'] : array();
        $getICFrom = (isset($options['getICFrom']) && null != $options['getICFrom']) ? $options['getICFrom'] : $this->defaultInputOptionsSource;
        $data = (isset($options['data']) && null != $options['data']) ? $options['data'] : null;
        $formOptions = (isset($options['options']) && null != $options['options']) ? $options['options'] : array();

        //Get the options handler service
        $optionsHandler = $this->getOptionsHandler();

        //Create a new input control factory
        $icFactory = new InputControlFactory($optionsHandler, $getICFrom, 'Mesd\Jasper\ReportBundle\InputControl\\');

        //Load the input controls from the client using the factory and the options handler
        $inputControls = $this->jasperClient->getReportInputControl($reportUri, $getICFrom, $icFactory);
        //Build the form
        $form = $this->container->get('form.factory')->createBuilder('form', null, $formOptions);

        if ($targetRoute) {
            $form->setAction($this->container->get('router')->generate($targetRoute, $routeParameters));
        }

        //Set the method
        $form->setMethod('POST');

        //Add the input controls
        foreach ($inputControls as $inputControl) {
            if (null !== $data && array_key_exists($inputControl->getId(), $data)) {
                $inputControl->attachInputToFormBuilder($form, $data[$inputControl->getId()]);
            } else {
                $inputControl->attachInputToFormBuilder($form);
            }
        }

        //Add the submit button
        $form->add('Run', 'submit');

        //Return the completed form
        return $form->getForm();
    }