Japer report in vaadin

Hello how to open a jasper report in vaadin. Can someone please help me


i have try this it have not worked do you have its full code

Nope that’s all I have


can you please tell me that the search path is

Try something like this var filename = “reports/paystub.jasper”;

    // Use class loader to load file resource from /src/main/resources/
    ClassLoader classLoader = getClass().getClassLoader();

    InputStream inputStream = classLoader.getResourceAsStream(filename);
    // the stream holding the file content
    if (inputStream == null) {
        throw new IllegalArgumentException("File not found! " + filename);

    Map<String, Object> param = new HashMap<String, Object>();
    param.put("p_company", company);

    // Load report
    JasperReport jreport = (JasperReport) JRLoader.loadObject(inputStream);
    JRBeanCollectionDataSource jdataSource = new JRBeanCollectionDataSource(journals);
    JasperPrint jprint = JasperFillManager.fillReport(jreport, param, jdataSource);
    return new ByteArrayResource(JasperExportManager.exportReportToPdf(jprint), "application/pdf");

hello i am displaying a jasperreport, i dont know why it is displaying one report everytime, can someone please guide me


Sorry, I don’t understand what you are trying to do. Can you please elaborate.

hello can you help me in doing sub report in vaadin