see my code for geting the datasource that give me error

sir i use under blow code for geting datasource

no error in datasource but when use datasource object that give me errr

Connection conn = null ;

// the following should be in a try-catch...

javax.naming.Context ctx = new javax.naming.InitialContext() ;

DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/Travel") ;

conn = ds.getConnection() ;

JasperReport jasperReport = JasperCompileManager.compileReport ("f:\ireport\fahim.jrxml","G",conn); ?(this line give me error )

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap(),obj);

please give me idea how i get ireport JasperReport viewer

thank's

aamir

[713 byte] By [mfa786a] at [2007-11-27 5:40:42]
# 1
I found and easier way to do it and wrote it up here: http://developers.sun.com/jscreator/learning/tutorials/2/reports.html
jetsonsa at 2007-7-12 15:17:24 > top of Java-index,Development Tools,Java Tools...