Jump to content
We've recently updated our Privacy Statement, available here ×

emmadi

Members
  • Posts

    7
  • Joined

  • Last visited

emmadi's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. u please see my report in the attachment ... u will come to uderstand what i am trying to tell
  2. Thanks for ur reply isRemoveLineWhenBlank="true" i have set this in jrxml but no result is this the same u r telling or do i need to do in any other way
  3. Hi I have generated a pdf report which takes parameters at runtime now i want to display that report with some colors like alternate rows in one color for that i used the following code. <printWhenExpression>new Boolean($V{PAGE_COUNT}.intValue() % 2 ==0 )</printWhenExpression> but my problem is i am able to display it but with a n extra line in between the two different colored rows... please any body help me in this regard.. Thanku
  4. Hi i am trying to generate a pdf report by passing groupname to the jrxml file here i am using pdf.jsp to pass the value String groupname =request.getParameter("groupname"); String file = request.getParameter("jr"); String fileloc = file+".jrxml"; System.out.println("filelocation-->"+fileloc); HashMap parameter = new HashMap(); JasperPrint jasperPrint = null; Connection connection = null; // parameter.put("gname",groupname); parameter.put("gname","employee"); File reportFile=new File(application.getRealPath(fileloc)); JasperDesign jasperDesign=JRXmlLoader.load(reportFile.getPath()); JasperReport jasperReport=JasperCompileManager.compileReport(jasperDesign); String dbproperties=application.getRealPath("Database"); FileInputStream fis=new FileInputStream(dbproperties); Properties props=new Properties(); props.load(fis); String driver=props.getProperty("driver"); String url="jdbc:mysql://localhost/harika" ; String username="root" ; String password="touch" ; Class.forName(driver); Connection jdbcConnection=DriverManager.getConnection(url,username,password); byte[] bytes=JasperRunManager.runReportToPdf(jasperReport,null,jdbcConnection); response.setContentType("application/pdf"); ServletOutputStream outputStream=response.getOutputStream(); outputStream.write(bytes,0,bytes.length); outputStream.flush(); outputStream.close(); }catch(Exception e) {out.println(e); } %> </body> </html> and modifications done in jrxml are <parameter name="gname" isForPrompting="false" class="java.lang.String"/> <queryString><![CDATA[select * from user_account where groupname=$P{gname}]]></queryString> but i dint get any errors while i am compiling but there is no result i am getting a blank pdf report Please some body help me thanku
  5. Hi i am trying to generate report by passing the value from pdf.jsp i did all the things which u had discussed but i am getting a blank pdf as a result please can any body help me Thanku Code: HashMap parameter = new HashMap(); parameter.put("gname",groupname);this code in pdf.jsp and<parameter name="gname" isForPrompting="true" class="java.lang.String"/> <queryString><![CDATA[select * from user_account where groupname=$P{gname}]]></queryString>in the jrxml file
×
×
  • Create New...