Jump to content
JasperReports Library 7.0 is now available ×

Error with Subreport Expression


camnott

Recommended Posts

Hello.

This issue stems from my report concept.  I am trying to create a main report that houses minimal information. I then have a sub report that pulls in some related information from other db tables.

I am trying to add another subreport that uses a separate datasource from the other two reports.  I have searched online and found a solution that I thought would work, and I still think that it would work, if not running into this issue :

java.sql.DriverManager.getConnection("jdbc:sqlserver://HostName;dbName","username","password")[/code]

Now - Before anyone answers saying that I should not have the //HostName portion - I know this... This is my problem... 

When the DBA's in my organization named this, they added that backslash ( ) into the hostname. I cannot get around this if I want to connect.  

I was able to create a Data Adapter using this, but cannot create an expression using the same. Kicks out the following : Invalid escape sequence (valid ones are b t n f r " ' \)

Is there a workaround, or another method that will be equally successful? The report runs, and the first subreport shows its data, but second subreport shows nothing, no matter what I do (because it is not getting data from the correct data source)

Any Ideas?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for your comment,  that just produced a different error - which leads me to believe that the first error was not the issue in the first place... : 

 

com.microsoft.sqlserver.jdbc.SQLServerConnection cannot be cast to net.sf.jasperreports.engine.JRDataSource

Link to comment
Share on other sites

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...