Connecting to Java-based Data Sources

The COM Data Source driver is targeted at Visual Basic and Visual C++ developers. Because Crystal Reports 10 has a full Java SDK, an equivalent Java Data Source driver provides equivalent functionality of the COM driver for developers using the Java platform.

The process of creating a Java Data Source driver is conceptually similar to that of creating a COM Data Source driver. A Java class needs to be created that has a public function with a return type of ResultSet or CachedRowSet. A ResultSet is the standard object returned from a JDBC-based query, whereas the CachedRowSet is a disconnected recordset useful for parsing out things like XML. Listing 15.2 shows a simple Java Data Provider that returns a ...

Get Special Edition Using® Crystal Reports® 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.