Skip to Content
author's profile photo Former Member
Former Member

How to speed generation of a report in Crystal Reports?

Hi Team,

I am Using Stored procedures to generate Crystal Reports. For simple Report with 5 procedures it is taking 15 minutes to generate the report. How can i resolve the issue to generate the report with 1 minute.

I deployed the application in WebSphere server and invoked the report using JSP. with the following code.

reportClientDocument = new ReportClientDocument();

reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);, OpenReportOptions._openAsReadOnly);

Fields<IParameterField> parameterFields = reportClientDocument.getDataDefController().getDataDefinition().getParameterFields();

System.out.println("Param Fields Size:"+parameterFields.size());

if (parameterFields.size() > 0) {

ParameterFieldController paramController = reportClientDocument.getDataDefController().getParameterFieldController();

for (int i = 0; i < parameterFields.size(); i++) {

String paramName = parameterFields.getField(i).getName().trim();

System.out.println(" - "+paramName);

if(request.getParameter(paramName) != null) {

paramController.setCurrentValue("", paramName, request.getParameter(paramName));


}else {

System.out.println("Param is Null:"+paramName+":"+request.getParameter(paramName));

paramController.setCurrentValue("", paramName, "");




reportSource = reportClientDocument.getReportSource();

session.setAttribute("ReportSource", reportSource);

byteArrayInputStream = (ByteArrayInputStream) reportClientDocument



response.setHeader("Content-disposition", "inline;filename=crreport.pdf");


byteArray = new byte[1024];

while((bytesRead = != -1) {

response.getOutputStream().write(byteArray, 0, bytesRead);





Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 08, 2014 at 05:35 AM

    Hi Penchal,

    Saving data in the report has a big effect. (do you also need to export to xls or pdf ?)

    File > Report Options > uncheck "Save data with report

    conditional or selection formulas takes time. try to execute your SP with as much filter as you can

    SUPPRESS sections (no drill-down) if you don't need that section

    Sub reports matters

    Ho much you query take time ? and you report takes for full generation ?

    Add a comment
    10|10000 characters needed characters exceeded

    • It is never an easy job to migrate a different solution to Crystal Reports. Since you're rewriting these reports in CR, you'd need to understand how CR works and what works best.

      Unfortunately, I cannot suggest what to do with the Subreports on the Details Section since I don't know the entire story about this report.

      My suggestion would be to :

      - Run the report in Actuate and maybe export it to PDF

      - Look at the fields on that report and see how you can duplicate them using one single Stored Procedure ready to be consumed by CR.


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.