Symptom
When exporting a crystal report with on demand subreport to a 3rd party exporting format such as PDF, CSV the on demand subreport appears as a link however you cannot drilled down into the link to get the subreport.
Environment
Crystal Reports 2008
Business Objects Enterprise XI 3.1
Cause
The on-demand subreport is a Crystal report which PDF or any 3rd party format does not understand. We can only view on-demand subreport link that can be drilled down in Crystal reports format or in DHTML viewer but not in any other format. The link is not an active link in any of the exported 3rd party formats.
Resolution
To workaround this issue use:
Embedded subreport instead of on-demand subreport.
Or At runtime change the subreport from being on-demand to embedded using the following code snippet.
ReportObjects reportObjects = reportClientDoc.getReportDefController().getReportObjectController().getReportObjectsByKind(ReportObjectKind.subreport);
for(int i=0; i < reportObjects.size(); i++)
{
ISubreportObject subreportObject = (ISubreportObject) reportObjects.getReportObject(i);
SubreportObject newSubreportObject = new SubreportObject(subreportObject);
newSubreportObject.setEnableOnDemand(false);
reportClientDoc.getReportDefController().getReportObjectController().modify(subreportObject, newSubreportObject);
}
Keywords
on demand subreport export pdf csv drill down , KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Problem