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

report without any parameter and error :/


aycansora

Recommended Posts

Hello everyone,

i am new in jasperreports and i couldnt find a solution and i need help. currently i am using ireport 4.6 and netbeans 7.1.2 and jdk 1.7 . i am trying to create a report without parameter but i always have problem to run it.  i am using the older version because some reports are created with older version and when i use the newer version its not sufficient. i mean when i change something on the report and compile it i see some other changes that i didnt change  but when i use older version i dont see other changes that i didnt change. So my error message is net.sf.jasperreports.engine.JRException: Error executing SQL statement for   .   And this is my method when i clicked the button

    private void PrintAllProjectsActionPerformed(java.awt.event.ActionEvent evt) {                                                 

     try{
         HashMap parameterMap = new HashMap();
         JasperPrint jasperPrint = JasperFillManager.fillReport(ClassLoader.getSystemResourceAsStream("C:/Users/Sorabatur/Desktop/Projects.jasper"), parameterMap, con);
         JasperViewer.viewReport(jasperPrint, false);
      }
      catch(Exception ex) {
         String connectMsg = "Could not create the report " + ex.getMessage() + " " + ex.getLocalizedMessage();
         JOptionPane.showMessageDialog (null,"ERROR -- TDCGUI.runReport: " + ex);
         JOptionPane.showMessageDialog (null, connectMsg);
      }   
    }  
So i dont know what i am doing wrong. And this is my simple sql code without any parameter because i dont need parameter just data from database.
SELECT
     TDCPROJECT."PROJNO" AS TDCPROJECT_PROJNO,
     TDCPROJECT."PROJNAME" AS TDCPROJECT_PROJNAME,
     TDCPROJECT."LOCATION" AS TDCPROJECT_LOCATION,
     TDCPROJECT."CREATIONDATE" AS TDCPROJECT_CREATIONDATE,
     TDCPROJECT."CREATOR" AS TDCPROJECT_CREATOR
FROM
     "TDCOWNER"."TDCPROJECT" TDCPROJECT
 
 
Could you please help me or at least share your opinions. Thank you .
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...