This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
how get datasource object in sun java studio creater
muhammad fahim
Ranch Hand
Joined: Dec 17, 2006
Posts: 45
posted
May 28, 2007 03:30:00
0
sir how i get datasource object for passing to ireport for calling jrxml report
i use this code
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);
but this line give me error
Context ctx = null;
ctx = new
InitialContext
();
} catch (
NamingException
ex) {
ServletOutputStream
ouputStream = response.getOutputStream();
JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, conn);
please give me idea how i call ireport
thank's
aamir
I agree. Here's the link:
http://aspose.com/file-tools
subject: how get datasource object in sun java studio creater
Similar Threads
Problem when give the Jasper Reports complied file name
Path error with JasperReports
Jasper Reports Exception
see my code that give me error
JasperReports - Desparate Help Required!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter