cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Crystal activex control

former_member1012208
Participant
0 Likes
1,169

I am trying to write a ASP.NET application that allows the user to run any crystal report. my requirement is, when the user selects the report, it should open the crystal activex control or java applet and run the report. If the control has not been installed, it should prompt for the installation.

I am not sure how to use this. I have already installed vs2005 with crystal 10. And the virtual directory is C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10

Could any one help me with this. Any help is greatly appreciated.

View Entire Topic
former_member184995
Active Contributor
0 Likes

Hi Don,

I am not sure what you are asking.

There is no Crystal Active X viewer/control in .NET that runs reports.

Also, Crystal Reports 10 is not supported with VS.NET 2005.

You would have to deploy the runtimes to the server (if a web app) or client (if windows app) and use the Crystal Reports .NET viewer to view the report.

Jason

former_member1012208
Participant
0 Likes

Thanks for the quick reply. Much appreciated.

The problem is when I use the crystalreportviewer that comes with VS2005, it takes a while to display the report. I was able to talk to another programmer (different company) and he mentioned that if I use the activex or the java applet that comes with crystal the report will be faster. He has already done this in VS2005 and crystal 10. He mentioned that his application could use any crystal version (Crystal 9 and above). Unfortunately he is not willing to share his infomation of how to do this. I was able to run some of my reports using his beta web application and there is a definite improvement in speed when running my report. And if the activex is not installed, his application prompts us to install it.

Also when setting up his application it asks for the crystal virtuo directory on the server. And I could select which viewer that I want (ActiveX, java..etc.). When you install crystal reports, it creates these folders under the virtual directory for crystal. (C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10)

Edited by: Don Perera on Aug 6, 2008 8:59 PM

former_member208657
Active Contributor
0 Likes

There are a number of reasons why your CR .NET application is running "slow". I've often found the DHTML viewer for the CR .NET SDK to perform quite reasonably if you architect your application well.

- where are you storing your ReportDocument object? In Cache, Session, or not persisting it?

- Are you using any process intense features like running totals or Page N of M?

- Are you using .NET DataSets and pushing data into your report?

- Can you give me any hard numbers to compare? How many seconds does it take to render the report in the ActiveX viewer vs. CR .NET?

former_member1012208
Participant
0 Likes

Thanks for your reply. Much appreciated.

I tried saving the reportdocument object in ssession and in Cache and still no improvements.

Yes some reports do use process intense features, but I tried few without and still no improvements.

I have some reports that displays data in 25 to 30 seconds in activex viewer (I get the same response when I run in crystal reports itselt). When I run these reports in CR.NET it takes over 3 minuets which is not acceptable even for a web aspx page.

Former Member
0 Likes

If you're able to provide more detail about how you're doing what you're doing, we might be able to suggest improvements.

Specifically:

- How does the report get data at runtime? (DataSet or direct connection? If it's a direct connection, what kind of connection is it? To what database? Are you using command objects in the report?)

- How many subreports does this report have? How do they get their data?

- How many tables does the report have? What about subreports? How many records are being returned per table?

- What special fields are on the report? What about subreports?

Have you enabled tracing on your ASPX page to find out which calls are taking the longest? This should give us some clues on what's causing the delay.

former_member1012208
Participant
0 Likes

- All reports use an ODBC connection to the Oracle database. Originally I used datasets, and loaded the report using ReportDocument. Then I read all the parameters from the report with their default values and prompt them in a different form for the user. Once the user enters the parameters and submit I read those and apply them to the report. Then I set the location of the report and assign the report to a CrystalReportViewer control. But because of the slowness, I removed all the parameter reading code. Now I only have 3 lines of code.

Dim rpt As New ReportDocument

rpt.Load("C:\Reports\Report1.rpt")

CrystalReportViewer1.ReportSource = rpt

With this code I don't have to read and apply the parameters or set the location. Crystal is prompting for the parameters and applying them without any issues.

- I do not have any subreports.

- This report returns 62,000 records.

- No special fields in this report.

- I installed VS2005 in a different PC, and still experience the same problem.

former_member208657
Active Contributor
0 Likes

Going from 30 seconds to 3 minutes is a pretty big jump. The CrystalReportViewer control for .NET is supposed to offer page on demand report processing. That means it will get you page 1 of your report as soon as it can. There are some things that can interfere with getting the first page like the page N of M or running totals.

When you run your report in your .NET web app does the whole thing take 3 minutes or does each page take 3 minutes?

One thing to keep in mind with the code you have is that you will be re-processing the report everytime you move to the next page in the report. If you want to cut down on processing you'll need to store the report in Session or Cache.

Dim rpt As New ReportDocument

// We always open reports as temporary files. This means each time you hit this code in a postback
// the report engine will see this as a new report and re-query the database.
rpt.Load("C:\Reports\Report1.rpt")          
CrystalReportViewer1.ReportSource = rpt