This week's book giveaway is in the
We're giving away four copies of
and have Sam Newman on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Other Java Products and Servers
JRC - multiple tables in crystal report
Joined: Feb 27, 2008
Feb 27, 2008 03:47:00
I am using the
Reporting component of Crystal Report XI R2 SP2.
I encounter error when pushing 2 Java resultset to a report as a datasource, like the code belows,
ReportClientDocument reportClientDoc = new ReportClientDocument();
query1 = "SELECT COLUMN1, COLUMN2 FROM TABLE1" ;
ResultSet resultSet1 = getResultSetFromQuery(query1, ResultSet.TYPE_SCROLL_INSENSITIVE);
String tableAlias1 = reportClientDoc.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
reportClientDoc.getDatabaseController().setDataSource(resultSet1, tableAlias1 , tableAlias1);
String query1 = "SELECT COLUMN1, COLUMN2 FROM TABLE2" ;
ResultSet resultSet2 = getResultSetFromQuery(query2, ResultSet.TYPE_SCROLL_INSENSITIVE);
String tableAlias2 = reportClientDoc.getDatabaseController().getDatabase().getTables().getTable(1).getAlias();
reportClientDoc.getDatabaseController().setDataSource(resultSet2, tableAlias2 , tableAlias2);
I wanna to ask, Does JRC support multiple tables in a report with the approach suggested above?
Thanks a lot!
Joined: Feb 27, 2008
Feb 28, 2008 20:43:00
Finally, I decided to use a join SQL or SubReport to do it.
Re-write SQL to form a single ResultSet and push it in into the report
To push one ResultSet to each SubReport => multiple tables in a report
I agree. Here's the link:
subject: JRC - multiple tables in crystal report
Java with Crystal Report11
Failed to export report with subreport using CrystalReports in java
Trouble with ODBC CSV connection when export Crystal RPT to PDF
setting runtime selection criteria in a jsp for crystal reports11 using jrc
[Crystal Reports] JRCAgent1 received a request that cannot be handled by the JRC
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015