?
Solved

Crystal Reports and record count

Posted on 2004-04-06
8
Medium Priority
?
1,357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 101

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 60 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
New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

 
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 101

Accepted Solution

by:
mlmcc earned 60 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 101

Expert Comment

by:mlmcc
ID: 10789053
Glad I could help

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

719 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