cancel
Showing results for 
Search instead for 
Did you mean: 

Help on server time out -Crystal report Viewer

0 Kudos

Hi All,

When we launch a crystal report through portal using crystal report viewer, the reports with more data( more parameter values) times-out. Basically the issue is because the crystal report loads the data and then renders through crystal report viewer. As the report has formula and sub reports it is taking quite some time to refresh. Is there any way to open the crstal report viewer as and when the data loads in to the report.  Please let me know the feasibility?

Regards,

Mirthu

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Are you using either of the "special" fields Page N of M or TotalPages?  If so, that's probably what's slowing down the display.  IIRC, the first page should display as soon as it's rendered.  However, if you use one of those fields, Crystal will have to process the whole report in order to get those values to display.

Another thing that can slow down a report is subreports and their placement.  If you have a subreport in your details section, that will also significantly slow down the display of your report.

-Dell

0 Kudos

Hi Dell,

Thanks for your help and time. The issue I face is the report loads completely and then only renders to Crystal report viewer. till that page is blank. Is it because i save the report before rendering. Please find the below code that i use for rendering the report.

CODE:

<%@page language="java" contentType="text/html; charset=ISO-8859-1"

       pageEncoding="ISO-8859-1" session="false"%>

<%@page

       import="com.crystaldecisions.sdk.occa.report.application.OpenReportOptions"%>

<%@page

       import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument"%>

<%@page

       import="com.crystaldecisions.sdk.occa.report.application.ParameterFieldController"%>

<%@page

       import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException"%>

<%@page

       import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>

       <%@page import="com.crystaldecisions.report.web.viewer.*"%>

<%@page

       import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase"%>

<%@page

       import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>

<%@page import="java.io.Writer"%>

<%@page import="java.io.IOException "%>

<%@ page import="com.crystaldecisions.report.web.viewer.ReportExportControl" %>

<%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ExportOptions" %>

<%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat" %>

<%@page

       import="com.crystaldecisions.sdk.occa.report.application.DatabaseController"%>

              <%@page

       import="com.crystaldecisions.sdk.occa.report.application.ReportSaveAsOptions"%>

       <% response.setHeader("pragma","no-cache");//HTTP 1.1

response.setHeader("Cache-Control","no-cache");

response.setHeader("Cache-Control","no-store");

response.addDateHeader("Expires", -1);

response.setDateHeader("max-age", 0);

//response.setIntHeader ("Expires", -1);

//prevents caching at the proxy server

response.addHeader("cache-Control", "private"); %>

<%

       String reportPath,Sharedpath;

       ReportClientDocument reportClientDocument;

           

            ParameterFieldController parameterFieldController;

           

            try{

               

                reportPath = "reportlocation";

             Sharedpath = "Target Location";

                reportClientDocument = new ReportClientDocument();

                reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);

                    

                     reportClientDocument.open(reportPath, OpenReportOptions._openAsReadOnly);

                     reportClientDocument.getDatabaseController().logon("Dbname", "dbpassword");              

                     System.out.println("Connecting...");

                   parameterFieldController = reportClientDocument.getDataDefController()

               .getParameterFieldController();

                parameterFieldController.setCurrentValues("", "param 1",

                     new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,29});

parameterFieldController.setCurrentValues("", "Param 2",

              new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23});

reportClientDocument.saveAs("Target Report Name","Target Location", ReportSaveAsOptions._overwriteExisting);

       reportClientDocument.close();

       System.out.println("Finished...");              

CrystalReportViewer viewer = new CrystalReportViewer();

viewer.setOwnPage(true);

viewer.setPrintMode(CrPrintMode.ACTIVEX);

viewer.setReportSource(Sharedpath);

//Render the report.

viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);

              System.out.println("Finished...");

       }  catch (ReportSDKException e) {

              // TODO Auto-generated catch block

              e.printStackTrace();

       }

%>

Thanks in Advance!

Regards,

Mirthu

DellSC
Active Contributor
0 Kudos

Why do you need to save the report before viewing?  Have you tried commenting out that part of the code and running the application to see whether that speeds things up?

-Dell

0 Kudos

Hi Dell,

     Thanks a lot for your time & help.

I tried rendering the report without saving, Comparitively now the report is rendering faster than before.

Currently When reports are refreshed from Java portal, it take some time to render the report in Crystal report viewer but once rendered, it loads all the pages and the navigation across pages happens quickly without any time lag. Seems the report loads with all data upfront on viewer in the browser.

We have an integration of CR 2008 in place with asp portal where the behavior is different.  Once a report is  refreshed,  crystal report viewer loads up immediately , the first page gets loaded with data whereas other pages loads as user navigates from page to page

With our Java portal integration, we want the same behavior as ASP portal integration wherein crystal report viewer should load immediately with the first page and as the user navigates to other page, it gets loaded. This approach helps in maintaining the connection between Web and application server.

Please let me know if it is feasible to load crystal report viewer immediately when we refresh the report from java portal.

Thanks in Advance!

Regards,

Mirthu

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

To add to Dell's ideas:

When you say "crystal report viewer", do you mean CR Server viewer? BI viewer? Viewer that is part of the .NET SDK? Java SDK? CR viewer?

Re.:


Basically the issue is because the crystal report loads the data and then renders through crystal report viewer.

How do you know? There are specific times when the data is processed on the client, but a good report design ensures that as much of the data processing is done on the DB server as possible.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

0 Kudos

Hi Ludek,

Thanks for your time.

"Basically the issue is because the crystal report loads the data and then renders through crystal report viewer."

I say this becasue,

The crystal report viewer is not rendering the first page as and when the data loads. It is taking quite some time and after the report loads it is rendering the report in Crystal report viewer.

It is through JAVA SDK i m rendering the report in crystal report viewer (Tomcat).

Please let me know if I am missing something in the code

Regards,

mirthu

former_member183750
Active Contributor
0 Kudos

I guess the question is; is that behavior any different from running the same report on the same data in the CR designer? And don't forget the database logon takes time also. At best, runtime will be equivalent to the designer, never better.

Another thing to realize is that when a report is called in the app, the app needs to load all the CR runtime, do a bunch of initializations, etc. If you refresh the report, is the performance any quicker?

You may also want to see if Report Bursting will be of any help:

Also search the CR Help for 'bursting'.

- Ludek

0 Kudos


Ludek,

Thanks for your time.

           I agree in Crystal report viewer (Portal) it would take the same time as it takes in CR designer.  I prefer, the first page should display as soon as the report is rendered in Crystal report viewer though the report is loading data. Is this feasible?

Regards,

Mirthu

0 Kudos

Hi ludek,

     Do we have any way to load page by page in crystal report viewer. As of now the report is getting rendered only after the report is loaded completely.

Thanks in Advance!

Regards,

mirthuleswari

former_member183750
Active Contributor
0 Kudos

Bursting is the only possibility I see - other than using Crystal Reports Server and scheduling the reports, then viewing the scheduled instance.

- Ludek