Solved

Crystal Reports and record count

Posted on 2004-04-06
8
1,334 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Crystal Reports Formula Field 17 59
SQL Expression in Crystal Reports 19 43
String to Date Formula Failure 2 38
Business Object Server 2 22
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now