Jump to content
We've recently updated our Privacy Statement, available here ×

java.lang.ClassCastException


camnott
Go to solution Solved by Friendly User,

Recommended Posts

Caused by: java.lang.ClassCastException: com.microsoft.sqlserver.jdbc.SQLServerConnection cannot be cast to net.sf.jasperreports.engine.JRDataSource

I am trying to create a connection to a data source for my subreport - here is parameter expression :

(Blocked out company information for this)

<parameter name="subreport_datasource" class="java.sql.Connection" isForPrompting="false">        <defaultValueExpression><![CDATA[java.sql.DriverManager.getConnection("jdbc:sqlserver://Host;databaseName","user","pword")]]></defaultValueExpression>    </parameter>[/code]

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...