Jump to content
Changes to the Jaspersoft community edition download ×

I need Help!!! with theJasperReport


fenix284

Recommended Posts

Good Morningto everybody; well i'll be direct to my point, look, i know that the JasperReport is a library, I'm working with eclipse (version 3.2.1), and i download the jasperreports-1.2.8, and jasperreports-1.2.8-applet; and I set them at C:/j2sdk1.4.2_047jre/lib/ext; so i writed my codige, in my eclipse plataform, but it gave me some mistakes, it do not found the JasperReports libray, i'm working with IReport too, in order to make some reports, so i have some reportes *.jrxml, *.jasper, *.bak; and i found some files with Java extention; i really confuse, because, the eclipse software, don't found the respect library of JasperReport; somebody can HELP ME!!!!! please!!!!

 

atte.

Abel A.

Rosas Jimenez

Universidad de San Martin de Porres

Lima-Peru

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1. Right Click Your project in Eclipse.

2. Select properties from popup menu. It will open dialog box titled 'Properties for your_project_name'

3. Select Java Build Path on left hand side tree.

4. Then select Libraries tab on right hand side tabs.

5. Use 'Add External JARs..' to add jasper_xxxx.jar

 

I hope that will help.

Link to comment
Share on other sites

Thanks a lot, really your showmethe way, now i don't have any error message, but how can imake it run , i mean, not just :

 

right click run as ..

but i suppost that as in the Ireport it should give some grapich show, look:

package creatos;

 

 

import net.sf.jasperreports.engine.*;

import net.sf.jasperreports.engine.fill.*;

 

import java.util.*;

import java.math.*;

import java.text.*;

import java.io.*;

import java.net.*;

 

import java.util.*;

import net.sf.jasperreports.engine.*;

import net.sf.jasperreports.engine.data.*;

 

 

/**

*

*/

public class ejemplo001_1172239796670_212229 extends JREvaluator

{

 

 

/**

*

*/

private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;

private JRFillParameter parameter_REPORT_DATE_FORMAT_FACTORY = null;

private JRFillParameter parameter_REPORT_CLASS_LOADER = null;

private JRFillParameter parameter_REPORT_TIME_ZONE = null;

private JRFillParameter parameter_REPORT_DATA_SOURCE = null;

private JRFillParameter parameter_REPORT_LOCALE = null;

private JRFillParameter parameter_REPORT_URL_HANDLER_FACTORY = null;

private JRFillParameter parameter_REPORT_PARAMETERS_MAP = null;

private JRFillParameter parameter_REPORT_CONNECTION = null;

private JRFillParameter parameter_IS_IGNORE_PAGINATION = null;

private JRFillParameter parameter_REPORT_VIRTUALIZER = null;

private JRFillParameter parameter_REPORT_SCRIPTLET = null;

private JRFillParameter parameter_REPORT_MAX_COUNT = null;

private JRFillField field_serv_id = null;

private JRFillField field_emp_id = null;

private JRFillField field_emp_firstname = null;

private JRFillField field_emp_salary = null;

private JRFillField field_emp_surname = null;

private JRFillField field_serv_name = null;

private JRFillVariable variable_PAGE_NUMBER = null;

private JRFillVariable variable_COLUMN_NUMBER = null;

private JRFillVariable variable_REPORT_COUNT = null;

private JRFillVariable variable_PAGE_COUNT = null;

private JRFillVariable variable_COLUMN_COUNT = null;

 

 

/**

*

*/

public void customizedInit(

Map pm,

Map fm,

Map vm

)

{

initParams(pm);

initFields(fm);

initVars(vm);

}

 

 

/**

*

*/

private void initParams(Map pm)

{

parameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");

parameter_REPORT_DATE_FORMAT_FACTORY = (JRFillParameter)pm.get("REPORT_DATE_FORMAT_FACTORY");

parameter_REPORT_CLASS_LOADER = (JRFillParameter)pm.get("REPORT_CLASS_LOADER");

parameter_REPORT_TIME_ZONE = (JRFillParameter)pm.get("REPORT_TIME_ZONE");

parameter_REPORT_DATA_SOURCE = (JRFillParameter)pm.get("REPORT_DATA_SOURCE");

parameter_REPORT_LOCALE = (JRFillParameter)pm.get("REPORT_LOCALE");

parameter_REPORT_URL_HANDLER_FACTORY = (JRFillParameter)pm.get("REPORT_URL_HANDLER_FACTORY");

parameter_REPORT_PARAMETERS_MAP = (JRFillParameter)pm.get("REPORT_PARAMETERS_MAP");

parameter_REPORT_CONNECTION = (JRFillParameter)pm.get("REPORT_CONNECTION");

parameter_IS_IGNORE_PAGINATION = (JRFillParameter)pm.get("IS_IGNORE_PAGINATION");

parameter_REPORT_VIRTUALIZER = (JRFillParameter)pm.get("REPORT_VIRTUALIZER");

parameter_REPORT_SCRIPTLET = (JRFillParameter)pm.get("REPORT_SCRIPTLET");

parameter_REPORT_MAX_COUNT = (JRFillParameter)pm.get("REPORT_MAX_COUNT");

}

 

 

/**

*

*/

private void initFields(Map fm)

{

field_serv_id = (JRFillField)fm.get("serv_id");

field_emp_id = (JRFillField)fm.get("emp_id");

field_emp_firstname = (JRFillField)fm.get("emp_firstname");

field_emp_salary = (JRFillField)fm.get("emp_salary");

field_emp_surname = (JRFillField)fm.get("emp_surname");

field_serv_name = (JRFillField)fm.get("serv_name");

}

 

 

/**

*

*/

private void initVars(Map vm)

{

variable_PAGE_NUMBER = (JRFillVariable)vm.get("PAGE_NUMBER");

variable_COLUMN_NUMBER = (JRFillVariable)vm.get("COLUMN_NUMBER");

variable_REPORT_COUNT = (JRFillVariable)vm.get("REPORT_COUNT");

variable_PAGE_COUNT = (JRFillVariable)vm.get("PAGE_COUNT");

variable_COLUMN_COUNT = (JRFillVariable)vm.get("COLUMN_COUNT");

}

 

 

/**

*

*/

public Object evaluate(int id) throws Throwable

{

Object value = null;

 

switch (id)

{

case 0 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 1 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 2 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 3 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 4 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 5 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 6 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 7 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 8 :

{

value = (java.lang.String)("C:\iReport\usmp_red.gif");

break;

}

case 9 :

{

value = (java.lang.String)("C:\iReport\usmp_red.gif");

break;

}

case 10 :

{

value = (java.lang.String)(((java.lang.String)field_emp_surname.getValue()));

break;

}

case 11 :

{

value = (java.lang.String)(((java.lang.String)field_emp_firstname.getValue()));

break;

}

case 12 :

{

value = (java.math.BigDecimal)(((java.math.BigDecimal)field_emp_salary.getValue()));

break;

}

default :

{

}

}

 

return value;

}

 

 

/**

*

*/

public Object evaluateOld(int id) throws Throwable

{

Object value = null;

 

switch (id)

{

case 0 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 1 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 2 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 3 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 4 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 5 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 6 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 7 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 8 :

{

value = (java.lang.String)("C:\iReport\usmp_red.gif");

break;

}

case 9 :

{

value = (java.lang.String)("C:\iReport\usmp_red.gif");

break;

}

case 10 :

{

value = (java.lang.String)(((java.lang.String)field_emp_surname.getOldValue()));

break;

}

case 11 :

{

value = (java.lang.String)(((java.lang.String)field_emp_firstname.getOldValue()));

break;

}

case 12 :

{

value = (java.math.BigDecimal)(((java.math.BigDecimal)field_emp_salary.getOldValue()));

break;

}

default :

{

}

}

 

return value;

}

 

 

/**

*

*/

public Object evaluateEstimated(int id) throws Throwable

{

Object value = null;

 

switch (id)

{

case 0 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 1 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 2 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 3 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 4 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 5 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 6 :

{

value = (java.lang.Integer)(new Integer(1));

break;

}

case 7 :

{

value = (java.lang.Integer)(new Integer(0));

break;

}

case 8 :

{

value = (java.lang.String)("C:\iReport\usmp_red.gif");

break;

}

case 9 :

{

value = (java.lang.String)("C:\iReport\usmp_red.gif");

break;

}

case 10 :

{

value = (java.lang.String)(((java.lang.String)field_emp_surname.getValue()));

break;

}

case 11 :

{

value = (java.lang.String)(((java.lang.String)field_emp_firstname.getValue()));

break;

}

case 12 :

{

value = (java.math.BigDecimal)(((java.math.BigDecimal)field_emp_salary.getValue()));

break;

}

default :

{

}

}

 

return value;

}

 

 

}

 

 

sorry if i's extends but this what IReport gave me when i finish my report there, it was the only Java extention file, so i compiler, it was right??? i mean or i'm confuse, and i have to do other things??, sorry if i look silly, but really is my first time with this tool, thanks a lot for every thing

atte.

Abel Rosas Jimenez

Link to comment
Share on other sites

look, i finish my report in IReport, and it gave 3 files, one

ejemplo001.jrxml ; other ejemplo001.jasper and the last ejemplo001_1172239796670_212229.java

i don't know why the IReport generate a lot of file with java extention, i mean i made another examples with IReport, and every time i run my report, the IReport genera me another file with Java extention, i suppost that it was because i made some changes, and the program didn't write over; but my real question is What i have to wait when i running my program with eclipse, it should appear the same view that appear with IReport ????, because i don't have error, now, but how do i know if it's rigth??, what have i to do after export my IReport file ???,

Link to comment
Share on other sites

  • 3 months later...

Any programmer knows that the load times aren't the same simply because you are using two totally different software to load/display a report.

 

This has nothing to do with jasperreports and it just indicates your lack of knowledge of how software works. I am always willing to help out here but if your basic knowledge of Software is so bad then dont bother asking questions about computer software let alone Java libraries or Java.

Link to comment
Share on other sites

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...