print data to twig file from custom form submit via controller

I have created a custom form, and I’m passing data to twig file from submitForm function as follows

public function submitForm(array &$  form, FormStateInterface $  form_state) { $  form_state->setRebuild();  $  data = ['role' => $  form_state->getValue('role'), 'date' => $  form_state->getValue('date') ]; MyController::Detail($  data);  } 

and in controller passing data to twig

public static function Detail($  data) {  return [ '#theme' => 'my_report', '#data' => $  data, ];  } 

but not able to get/print data in twig file.