how get datasource as object for passing to ireport calling

hi master

sir how get datasource object

such as netbeans give me idea

====================

Context ctx = null;

DataSource ds = null;

try {

ctx = new InitialContext();

ds = (DataSource) ctx.lookup("jdbc/as400");

} catch (NamingException ex) {

ex.printStackTrace();

}

Connection conn = ds.getConnection();

ServletOutputStream ouputStream = response.getOutputStream();

JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, conn);

=================

can i get datasouce in studio crater

and pass to ireport for calling report

please give me idea how i get datasource

thank's

aamir

[742 byte] By [mfa786a] at [2007-11-27 5:39:46]
# 1
Yes you can. See my answer to your similar question.
jetsonsa at 2007-7-12 15:15:22 > top of Java-index,Development Tools,Java Tools...