Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Crystal report with ODBC Connectivity Post Reply Post New Topic
Author Message
Maheshwari
Newbie
Newbie


Joined: 24 Sep 2015
Location: India
Online Status: Offline
Posts: 2
Quote Maheshwari Replybullet Topic: Crystal report with ODBC Connectivity
    Posted: 28 Sep 2015 at 7:32pm
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");
IP IP Logged
Maheshwari
Newbie
Newbie


Joined: 24 Sep 2015
Location: India
Online Status: Offline
Posts: 2
Quote Maheshwari Replybullet Posted: 29 Sep 2015 at 1:54am
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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.063 seconds.