Jump to content


  • Posts

  • Joined

  • Last visited

subhashreddy594's Achievements


Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges



  1. I have successfully embedded jasperviewer in an applet. Here is the java code for it, public class WebservicewithApplet extends javax.swing.JApplet{ public void init() { javax.swing.JPanel pnlMain = new javax.swing.JPanel(); pnlMain.setLayout(new java.awt.BorderLayout()); getContentPane().add(pnlMain, java.awt.BorderLayout.CENTER); try { JServer js = new JServer(); js.setUrl("http://localhost:8080/jasperserver-pro/services/repository"); js.setUsername("jasperadmin"); js.setPassword("jasperadmin"); ResourceDescriptor rd = new ResourceDescriptor(); rd.setUriString("/reports/DemoSamples/StandardCharts"); rd.setName("DemoCharts); Map params = new HashMap(); //params.put("Year","2012"); WSClient client = new WSClient(js); JasperPrint jasperPrint = client.runReport(rd, params); JasperViewer.viewReport(jasperPrint); if (jasperPrint != null) { JRViewer viewer = new JRViewer(jasperPrint); pnlMain.add(viewer, BorderLayout.CENTER); } } catch (Exception e) { StringWriter swriter = new StringWriter(); PrintWriter pwriter = new PrintWriter(swriter); e.printStackTrace(pwriter); JOptionPane.showMessageDialog(this, swriter.toString()); } } }if i run this code, i get an applet which is showing a jasperviewer in it.But my problem is, if i extracted the code in jar file and called in a jsp page its just displaying an white page. (I have checked the browser issues and sure that all swing/normal applets are working fine)jsp code:<body><%@page import = "com.jaspersoft.ireport.jasperserver.JServer,com.jaspersoft.ireport.jasperserver.ws.WSClient,com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor,net.sf.jasperreports.engine.JasperPrint,net.sf.jasperreports.view.JRViewer,net.sf.jasperreports.view.JasperViewer,java.util.Map,java.util.HashMap,net.sf.jasperreports.engine.JasperExportManager,java.io.*,java.util.Scanner" %><OBJECT width="500" height="500" data="test/WebservicewithApplet.class" type="application/x-java-applet"> <PARAM name="code" value="test/WebservicewithApplet.class"> <PARAM name="archive" value="WebservicewithApplet.jar,jasperreports-applet-5.2.0.jar"></OBJECT><Applet code="test.WebservicewithApplet.class" archive="WebservicewithApplet.jar,jasperreports-applet-5.2.0.jar" height="600" width="600">no</Applet></body>Tried with both object,applet tags but no result.Test package is having java class which is showing jasperviewer in an applet. I have exported java class to jar file in eclipse 'Export Jar File' Option. Please provide suggestions where i went wrong??? Thanks & Regards,Subhash
  2. Hi all, I have a scenario, where in a barchart i need to color the max value bar with green and min value bar with red colors. The problem here is, with setSeriesPaint() we can only give color to differ the series comparision.. but i need to differ max min values with in a single series as well. So in simple i can say it as Category coloring. For instance, in a single series name it as "Month" with category values as "Jan,Feb,March........." month with high performance should be in one color(green) and month with low performance should be in other color(red), ofcourse the rest of the bars should be in series default color(blue). Any suggestions please...??
  • Create New...