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

booyeeka

Members
  • Posts

    7
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by booyeeka

  1. Hi all!

     

    I can create nice report with jasperReports, and to preview it before printing.

     

    How can I suggest report file name and extension, when I want to save it from PrintPreviw layout? I wolud like to have a suggestion, and to set default type as pdf.

     

    Thank you in advance!

    Post edited by: booyeeka, at: 2006/10/29 10:45

  2. Hi all!

     

    Can you help me how to send complete SQL query into JasperReports, from Java code.

     

    If in Java code I send (put) one parameter, like:

     

    Code:

    String empid = "3";
    reportParam.put("EMPID", empid);

     

    ... this example works, by a simple call of next query in Jasper's XML file:

     

    Code:
    [code]
    select * from employees where Employee_ID = $P{EMPID}

     

    BUT, when I try to call query in java file like :

     

    Code:
    [code]
    String empid = "select * from employees where Employee_ID = 3";
    reportParam.put("EMPID", empid);

     

    ... with $P{EMPID} only defined in jasper file, I get the following error:

     

    Code:
    [code]
    java.lang.NullPointerException

     

     

    Can you tell me where is my mistake?

     

    Thank you in advance!

×
×
  • Create New...