Solved

Crystal Reports and record count

Posted on 2004-04-06
8
1,338 Views
Last Modified: 2012-06-21
Hi,

Does anyone know how to find the number of records that will be returned as a result of SQL query defined for a crystal report? In one of my application, crystal report wait for a long time until the records are returned and I am trying to find if there is a way I can count the record before the report is loaded in the designer.

Another question is how I will cancel if the report has started loading.

Thanks
0
Comment
Question by:nauman_ahmed
  • 3
  • 3
  • 2
8 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 10768783
If you're working in the developer then when the report starts to load you should have a small button with a solid black square on it that will "stop" reading of the data.  Where it's located depends on the version but it's probably top right below your toolbar or bottom right.

As far as number of records, you can find that out of course but crystal finds out by loading and counting so that isn't going to help you.  If you're working in an application you could always send a "select count(*)" command to the db and based on the result decide whether to launch the crystal report or not.

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 10769734
There is a property that will allow you to know how many records.

CR8 instructions
Open the report
Click FILE --> OPTIONS
On the REPORTING Tab
Click the COUNT NUMBER OF RECORDS FIRST option
You can also set a warning if over a number of records.

If this is from an application, I have code which determines if any records are returned and cancels the report if no records are available.  Not sure if it returns how many.  I'll check

mlmcc
0
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 20 total points
ID: 10769852
Sorry nauman_ahmed, I wasn't aware that CR8 had this function (that's why mlmcc is #1).

If you don't have CR8 though, check for this function in your version.  As far as I can tell it has been dropped at some point because it doesn't seem to be supported in CR9.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 25

Author Comment

by:nauman_ahmed
ID: 10774491
Thanks a lot for your replies...

1. Sorry, it was my mistake. Actually I must have written loaded in the "Viewer" but I wrote "designer". I tried the options in the Reporting tab but it doesnt seems to work. COUNT NUMBER OF RECORDS FIRST option is checked and the default settings for Warn if more than 500 records is also there but no warning was appeared.

2. I am using the COM component for viewing the crystal report in the application. The viewer has a function to stop loading the report but I dont know how to stop loading the data when the stop button is clicked. Couldnt find any method to cancel the report loading.

Thanks for the help again....
0
 
LVL 25

Author Comment

by:nauman_ahmed
ID: 10775090
Also, does anyone know which DLL's to include if I am using Crystal report embedded designer and crystal report viewer in my application. Currently I have added the following DLLs:

craxddrt.dll
CRDesignerCtrl.dll
crpaig32.dll
Crpaig80.dll
crviewer.dll
P2bbnd.dll
p2bdao.dll
p2ctdao.dll
p2irdao.dll
p2sevt.dll
P2smon.dll
p2sodbc.dll

I included most of these dll files after hit and trial and as application generated errors that the dll is not found. I couldnt able to find a document on the internet or Crystal Report 8.5 help stating which dll's to include in my setup.

Thanks.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 20 total points
ID: 10780530
craxddrt.dll -  Unless you are allowing the users to build reports you should include CRAXDRT.dll instead of this

CRDesignerCtrl.dll - Not sure what this is.  We don't include it but then we aren't using the embedded designer.

Not sure what these are either.
crpaig32.dll
Crpaig80.dll

crviewer.dll - This is the viewer and is required.

These are the database drivers.  Depending on the database connection method you will need some of these.
P2bbnd.dll
p2bdao.dll
p2ctdao.dll
p2irdao.dll
p2sevt.dll
P2smon.dll
p2sodbc.dll

This lists the required files
http://support.businessobjects.com/library/kbase/articles/c2008905.asp

mlmcc
0
 
LVL 25

Author Comment

by:nauman_ahmed
ID: 10783203
your help was great guys thanks a lot again. Splitting up the points... :)
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 10789053
Glad I could help

mlmcc
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Crystal Reports  Formula to Command 4 81
Crystal Reports CSV data source, field types 6 98
Crystal Report detail 15 46
business objects to connect to MSSQL 6 72
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question