Solved

Crystal Reports and record count

Posted on 2004-04-06
8
1,348 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 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
Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

 
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 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 101

Expert Comment

by:mlmcc
ID: 10789053
Glad I could help

mlmcc
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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. …
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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