Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RAS ReportClientDocument open method is very slowww...

Status
Not open for further replies.

nimapoggy

Programmer
Mar 4, 2002
34
FR
Hello,
I use Crystal Report and Enterprise 10, French version unmanaged RAS on Win2k/IIS5/ASP(vbscript).
When I create a report and load it with the open method of ReportClientDocument object, it takes a lot of time to load. I made some tests with multiple home-made reports and Crystal sample reports with the "save datas with report" option off and it seems to take about 10 seconds to load for each report and sub-reports. It means that if I create a report containing 6 sub-reports, the report will take about 70s to load. Strange, isn't it ?

Any one know why it's so slow ?

I paste my code below :
Code:
Dim objObjectFactory,objClientDoc
' set the factory object
Set objObjectFactory = _ Server.CreateObject("CrystalReports10.ObjectFactory.1")
' set the client doc object
Set objClientDoc = _ objObjectFactory.CreateObject("CrystalClientDoc.ReportClientDocument")
' open report : it is here that it takes 70s.
objClientDoc.Open "myreport.rpt"

Geeks are people who thinks that a kilometer is 1024 meters long.
 
We're seeing a similar behavior in CE-RAS Advanced, version 9. One report which contains a number of subreports (20, to be exact) starts at a baseline of around 60 seconds in my main test environment. No matter how fast the stored procedures are that provide the data to the report, we get hurt by that same type of line (the last one in the example below).
Code:
Dim objectFactory
Set objectFactory = CreateObject("CrystalReports.ObjectFactory.2")

Dim clientDoc
Set clientDoc = objectFactory.CreateObject("CrystalClientDoc.ReportClientDocument")

clientDoc.Open "rassdk://" & strReportDir & theReportName
 
Yep, it seems to be exactly the same problem...
i still don't any answer :(

Geeks are people who thinks that a kilometer is 1024 meters long.
 
Some things you might try revolve around three statements I eventually found in the RAS COM SDK documentation. Each of these three things essentially gives you two options, for a total of 8 combinations. I tried 4 of them, though, and unfortunately none resulted in any difference in the length of opening my slowest report (the one with the many subreports). Maybe in version 10 things will be different for you.

From the documentation:

1. The ProgID for each object in the Crystal Client Document Library consists of the object name concatenated to the text "CrystalReports" with a period. "CrystalClientDoc" is still supported for compatibility with an earlier version of RAS.

2. When saving and opening a report, you must specify the path of the document. You enter the path as c:\directory\reportname.rpt (which is equivalent to using the ras://c:\ prefix). You can also use the form rassdk://c:\directory\reportname.rpt with the rassdk:// prefix; however, this method is not recommended because the document is opened and saved on the local machine and then sent serially to the RAS server (even if the RAS server and the SDK are on the same machine). Without the rassdk:// prefix in the path, the document is opened and saved directly on the RAS server. Thus, c:\abc.rpt refers to c:\ on the RAS server, while rassdk://c:\abc.rpt refers to c:\ on the SDK machine.

3. To connect to a RAS Server, use the ReportAppSession Object. For any report that you wish to open, modify, or create, you must first create and initialize a ReportAppSession to establish a connection to the RAS Server. The ReportClientDocument Object can still be used to establish a connection, but this object is only supported for compatibility with an earlier version of RAS.

Basically, our two examples both used the "old" option from #3, but you and I differed on our options for item #2. Unfortunately in our environment, the way we have to configure our servers requires us to keep our .rpt files on the RAS SDK machine (which is separate from our RAS Server). Therefore, we're stuck with the one option from #2.

Some more pieces of code to illustrate the differences. I'll include bits of the "suggested" option from choice #3 since we both already had code from the "old" option on #3.:
Code:
Set objFactory = CreateObject("CrystalReports.ObjectFactory.2")

Set rptAppSession = objFactory.CreateObject("CrystalReports.ReportAppSession")

rptAppSession.Initialize

Set ReportDoc = rptAppSession.CreateService("CrystalClientDoc.ReportClientDocument")
    '--OR--(Here's the other choice for item #1)
Set ReportDoc = rptAppSession.CreateService("CrystalReports.ReportClientDocument")

ReportPath = C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\A_Report.rpt

ReportDoc.open ReportPath
    '--OR--(Here's the other choice for item #2)
ReportDoc.open "rassdk://" & ReportPath

You might try some of these other combinations to see if they give you any more speed in version 10. If they do help, please let me know, as it might be a consideration for me to move to version 10.
 
Hi !
Thanks for all your researches, I hope this will help someone to fix this thing with you.
But unfortunately we had to find another way to prevent our reports to be so slow in our project... and as we didn't have any time to make researches to optimize loading time, we just decided to generate the PDF files exported from the reports each night as crons. Now I don't have any more time to spend on this project, so I can't do more researches about this. I hope you'll find something anyway.
I'm really sorry.
Nicolas.

Geeks are people who thinks that a kilometer is 1024 meters long.
 
Problem found, and solved. Information is now written up in faq782-5357 in this forum!
 
Hi all !
It seems to be a wanted slowness !
We found this article on BO's Site :
Report performance is slower in Crystal Enterprise
Embedded because the keycode that is provided for
this edition limits the amount of CPU resources
that can be used by this application. This results
in slower performance than expected when viewing
reports over the Web.

To improve report performance, contact our Sales
department to purchase a full processor license for
Crystal Enterprise that will allow the application
to use 100% of the CPU processing power.

Geeks are people who thinks that a kilometer is 1024 meters long.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top