Please help me: How to load pdf from server with jquery ajax

0

Please help me!!!!

 

I have this section code:

.................................

......................

byte[] bytes = null;
            
            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("fecha_generacion", "Septiembre 07, 2013");
            parameters.put("cuenca_nombre", "mi cuenca"); 
 
            Map data = new HashMap();        
            data.put("variable_informe_texto", "Variable de prueba 01");
            data.put("variable_informe_recomendacion", "la recomendacion es xxxxx");
            Map data2 = new HashMap();
            data2.put("variable_informe_texto", "Variable de prueba 02");
            data2.put("variable_informe_recomendacion", "la recomendacion es yyyyyy");        
            List dataList = new ArrayList();
            dataList.add(data);
            dataList.add(data2);
JRMapCollectionDataSource JRMapDataList = new JRMapCollectionDataSource(dataList);
 bytes = JasperRunManager.runReportToPdf(reportFile.getPath(), parameters, JRMapDataList);
 
Now how to send this byte array. and how to load fro jquery with ajax?
 
Thanksss!!!
 
raulrojash's picture
Joined: Sep 8 2013 - 2:35pm
Last seen: 6 years 5 months ago

0 Answers:

No answers yet
Feedback
randomness