Solved

Crystal Reports and record count

Posted on 2004-04-06
8
1,346 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 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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

751 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