This discussion is archived
0 Replies Latest reply: Dec 13, 2010 3:39 AM by 818300 RSS

JRC ReportClientDocument parse Record Selection forumla incorrectly

818300 Newbie
Currently Being Moderated
Hi,
We are using CR XI to develop the reports and configure it to our web application. We are using the ReportClientDocument class in jrcerom jar to read the report and parse it contents. It is working fine for many scenarios except the below one. In a report, we have a sub report and it is linked to the parent report. (A record selection formula is created automatically for the link in the Record Selection for the subreport). When ever the sub report returns atleast one record it is working fine. But when ever the sub report returns zero record we are getting the below exception. Please help

Code:
IReportSource reportSource = reportClientDocument.getReportSource(); ExportOptions expOpt = new ExportOptions(); expOpt.setExportFormatType(ReportExportFormat.PDF); PDFExportFormatOptions pdfExpOpt = new PDFExportFormatOptions(); expOpt.setFormatOptions(pdfExpOpt); ReportStateInfoImpl repStateInfo = new ReportStateInfoImpl(); RequestContextImpl reqCont = new RequestContextImpl(); reqCont.setReportStateInfo(repStateInfo); InputStream byteArrayInputStream = reportSource.export(expOpt, reqCont); // Exception is thrown here when sub report returns 0 record.


Exception:
Need to recompile formulas, the number of formulas needed to recompile is 1 Formula {@Record Selection} did not compile: com.crystaldecisions.reports.formulas.ak: Exception in formula '{@Record Selection}' at '{?Pm-Command.EMPID}': A string is required here. com.crystaldecisions.reports.formulas.ak: Exception in formula '{@Record Selection}' at '{?Pm-Command.EMPID}': A string is required here. Formula error: recompile formulas failed com.crystaldecisions.reports.formulas.ak: Exception in formula '{@Record Selection}' at '{?Pm-Command.EMPID}': A string is required here. at com.crystaldecisions.reports.formulas.ab.a(Unknown Source) at com.crystaldecisions.reports.formulas.ab.a(Unknown Source) at com.crystaldecisions.reports.formulas.ab.e(Unknown Source) at com.crystaldecisions.reports.formulas.ab.if(Unknown Source) at com.crystaldecisions.reports.formulas.j.for(Unknown Source) at com.crystaldecisions.reports.formulas.ab.if(Unknown Source) at com.crystaldecisions.reports.formulas.j.goto(Unknown Source) at com.crystaldecisions.reports.formulas.a6.a(Unknown Source) at com.crystaldecisions.reports.formulas.FormulaInfo.do(Unknown Source) at com.crystaldecisions.reports.formulas.FormulaService.compile(Unknown Source) at com.crystaldecisions.reports.reportdefinition.fb.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.c1.a(Unknown Source) at com.crystaldecisions.reports.reportdefinition.d9.else(Unknown Source) at com.crystaldecisions.reports.reportdefinition.d9.else(Unknown Source) at com.crystaldecisions.reports.reportdefinition.d9.else(Unknown Source) at com.crystaldecisions.reports.dataengine.j.if(Unknown Source) at com.crystaldecisions.reports.dataengine.j.if(Unknown Source) at com.crystaldecisions.reports.dataengine.j.if(Unknown Source) at com.crystaldecisions.reports.dataengine.j.a(Unknown Source) at com.crystaldecisions.reports.dataengine.a8.a(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.e.l.(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.e.p.(Unknown Source) at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source) at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source) at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source) at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source) at com.businessobjects.reports.sdk.b.i.int(Unknown Source) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source) at com.crystaldecisions.proxy.remoteagent.y.a(Unknown Source) at com.crystaldecisions.proxy.remoteagent.r.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.cf.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source) at com.mysystems.common.MyReport_Crystal.print(MyReport_Crystal.java:410) at org.apache.jsp.english.ShowReport_jsp._jspService(ShowReport_jsp.java:278) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at

Edited by: 815297 on Dec 13, 2010 3:37 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points