Spring mvc Compiler sub reports

0

 

I already have my report and sub report created and running by jasperStudio but I can not compile the sub report in java Spring mvc

controller

 

..insert your code here..
@bean is already configured</pre>
 
@Bean
public JasperReportsViewResolver getJasperReportsViewResolver() {
   JasperReportsViewResolver resolver = new JasperReportsViewResolver();
   resolver.setPrefix("classpath:/relatorios/");
   resolver.setSuffix(".jasper");
   resolver.setReportDataKey("datasource");
   resolver.setViewNames("find*");
   resolver.setViewClass(JasperReportsMultiFormatView.class);
   resolver.setOrder(0);
   return resolver;
}


my controler works only for a simple report</pre>

..insert your code here..
@RequestMapping(value = "findDisciplinaPdf", method = RequestMethod.GET) 
public ModelAndView getRpt5(ModelMap modelMap, ModelAndView modelAndView, 
HttpServletRequest request) {
 modelMap.put("datasource", disciplinaRepository.findAll()); 
modelMap.addAttribute("datasource", disciplinaRepository.findAll());
 modelMap.put("format", "pdf"); 
modelMap.put("image", this.getUrl(request)); 
modelAndView = new ModelAndView("findDisciplina", modelMap); 
return modelAndView; }
 

<pre data-fulltext="" data-placeholder="Tradução" dir="ltr" id="tw-target-text">

someone knows how to pass the paramentros and compile correction the report with its sub

guilhermehalo123's picture
Joined: Apr 28 2017 - 4:55am
Last seen: 1 year 2 months ago

"/jasper/SUBREPORTNAME.jasper" try like this in subreport expression in the main jrxml.

jasperrocks - 2 years 1 month ago

 

Where should I try?

guilhermehalo123 - 2 years 4 weeks ago

0 Answers:

No answers yet
Feedback
randomness