| |
| ||||||
Comment on SAS under pressure from Pentaho by swathiThis is a discussion on Comment on SAS under pressure from Pentaho by swathi within the Open Source News and Opinion forums, part of the Open Source Analytics category; Hi, I want to generate report using struts2.0,jsp it is generating but when i want to generate report in client side the preview is not generated in client side its ... |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| News Bot Join Date: Nov 2007
Posts: 15,085
![]() | Hi, I want to generate report using struts2.0,jsp it is generating but when i want to generate report in client side the preview is not generated in client side its generating in my system(i.e, Server) how to generate report in client side… and my code for generating report is…… ClassicEngineBoot.getInstance().start(); ResourceManager manager = new ResourceManager(); manager.registerDefaults(); URLConnection uc; URL url = null; String s = request.getContextPath(); final String path = System.getProperty(“catalina.home”) + “/webapps” + s + “/reports/”+”job_card.prpt” ; url = new URL(“http://localhost:8080/”+s+”/reports/job_card.prpt”); // url = new URL(pathimage); try { uc = url.openConnection(); } catch (IOException e) { e.printStackTrace(); } org.pentaho.reporting.libraries.resourceloader.Res ource res = manager.createDirectly(url, MasterReport.class); System.out.println(“before pdf report creation”); try { HtmlReportUtil.createDirectoryHTML((MasterReport) ((org.pentaho.reporting.libraries.resourceloader.R esource) res).getResource(), “http://localhost:8080/LvhtGre1/reports/reportgre.pdf”); } catch (ReportProcessingException e) { log.setError(e, “Print Preview in GRE”); e.printStackTrace(); } catch (IOException e) { log.setError(e, “Print Preview in GRE”); e.printStackTrace(); } MasterReport report = (MasterReport) ((org.pentaho.reporting.libraries.resourceloader.R esource) res).getResource(); ReportParameterValues paramValues = report.getParameterValues(); int code = Integer.parseInt(goodsReceivingEntry.getCode().toS tring()); paramValues.put(“jobcode”, code); paramValues.put(“plant_id”, plant_id); // Set Dimension Toolkit tk = Toolkit.getDefaultToolkit(); Dimension d = tk.getScreenSize(); int width = d.width – 400; int height = d.height – 100; int X = (d.width / 2) – (width / 2); // Center horizontally. int Y = (d.height / 2) – (height / 2); // Center vertically. try { HtmlReportUtil.createStreamHTML(report, “http://localhost:8080/LvhtGre1/repor....html”); } catch (ReportProcessingException e) { log.setError(e, “Print Preview in GRE”); e.printStackTrace(); } catch (IOException e) { log.setError(e, “Print Preview in GRE”); e.printStackTrace(); } final PreviewDialog preview = new PreviewDialog(report); preview.setBounds(X, Y, width, height); preview.setPreferredSize(new Dimension(width, height)); preview.setMaximumSize(new Dimension(width, height)); preview.setMinimumSize(new Dimension(width, height)); // preview.setVisible(false); preview.pack(); preview.setVisible(true); More from James Dixon’s Blog ... |
| | |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Comment on SAS under pressure from Pentaho by swathi | Latest News Headlines | Open Source News and Opinion | 0 | 30th June 2011 09:24 AM |
| Comment on SAS under pressure from Pentaho by Joe | Latest News Headlines | Open Source News and Opinion | 0 | 4th November 2010 05:32 AM |
| Comment on SAS under pressure from Pentaho by James | Latest News Headlines | Open Source News and Opinion | 0 | 4th November 2010 01:39 AM |
| Comment on SAS under pressure from Pentaho by James | Latest News Headlines | Open Source News and Opinion | 0 | 2nd November 2010 09:57 AM |
| Comment on SAS under pressure from Pentaho by Tweets that mention SAS under pressure | Latest News Headlines | Open Source News and Opinion | 0 | 2nd November 2010 09:57 AM |
| | |
| | |