|
HI,
I have connected the crystal report with the Sqlserver Odbc Connectivity,In java application having jdbc connectivity ,It is connecting to the crystal report,but not connecting to the database.
byteArrayInputStream = (ByteArrayInputStream) reportClientDocument.getPrintOutputController().export(ReportExportFormat.PDF);
response.setHeader("Content-disposition", "inline;filename="+reportName+".pdf");
response.setContentType("application/pdf");
|
|
Hi,
I got the result for the above problem,crystal report is connected with sqlserver(Odbc),java application is using jdbc connectivity.throwing Error finding JNDI name .below code resolve the issue.
web.xml
<resource-ref>
<description>Resource reference to a factory for
java.sql.Connection</description>
<res-ref-name>jdbc/jdb</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
context.xml
Resource name="jdbc/jdb" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="dd" password="dd" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://000.000.0.01:1233;databaseName=xxx"/>
Regards,
Edited by Maheshwari - 29 Sep 2015 at 1:54am
|