on 05-20-2014 2:38 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.