Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

iReport Barcode Error evaluating expression

807591Jun 25 2005 — edited Apr 24 2008
Hi All,

I got problem with my barcode.
I have created report using iReport 0.5.0 this can work fine with viewer on iReport.
But when I call report from java program with jasperReport 0.6.7 I got the error:

Error evaluating expression : image_1
Source text : it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(12,$P{p_noreg},false,false)


this is my simple code:
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.JRViewer;
import net.sf.jasperreports.view.JasperViewer;
import java.util.HashMap;
import java.sql.*;
import java.net.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;

public class myReport {
    public myReport() {
        
        Connection con =null;
        String URL ="jdbc:postgresql://192.168.0.9:5432/SGHS";
        String user ="postgres";
        String pass ="hi1924";
        try{
            Class.forName("org.postgresql.Driver");        
            con=DriverManager.getConnection(URL,user,pass);
        } catch(ClassNotFoundException ce) {}
        catch(SQLException se) {}
	HashMap reportParam = null;
    	reportParam.put("p_noreg","050625001011");
	try{
    		JasperPrint print = JasperFillManager.fillReport("/root/jas/label.jasper", reportParam , con);
    		JasperViewer.viewReport(print);
	} catch(JRException je){System.out.println(je.getMessage());}
    }
    
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new myReport();
            }
        });
    }
    
    
}
I try to get the solutions arround the cyberword but i did not get anything.
Anybody can help me? Please....
Thnk You
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2008
Added on Jun 25 2005
6 comments
1,445 views