I'm developing a custom JRDataSourceProvider for Lotus Domino. I have also a custom JRDataSource object for use with Lotus Domino. This custom JRDataSource exposes a member called getProvider(), this is to get the provider which is being created by iReport, since there is no parameter/variable in iReport to get a custom provider. The provider also exposes a Domino Session object for use in the creation of new custom JRDataSource to be used in subreport, i.e. in the Data Source Expression of subreport, I could specify: myPackage.createCustJRDSource(((myPackage.customJRDSource)$P{REPORT_DATA_SOURCE}).getProvider().getDominoSession(), "MyNotesView"); I have to use only one Domino Session for this implementation, otherwise other Domino objects will not be synchronized. This is what Domino documentation emphasized. This works like a charm. The problem is when one or more sort fields are specified in the report, the REPORT_DATA_SOURCE parameter becomes JRSortableDataSource, which throws ClassCastException when I try to run the report. That is because, the subreport expression casts it to customJRDSource, to invoke the getProvider() member. How would I workaround this problem? It's going to be a real pain if I will implement the my own sorting :( Thank you very very much. Post edited by: pinoytechie, at: 2007/05/10 20:23