Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I pull in only 50 records per REPORT?? 1

Status
Not open for further replies.

Goha

IS-IT--Management
May 9, 2002
91
0
0
US
How do I pull in 50 records per report. from a 15006 row table. i am using MS sql using an odbc connection

THanks in advance
 
Hi,

Apply TOP n PERCENT in your SQL sttement. 'n' is an Integer (0 -100)

Regards,

Ahmed
 
If you can't modify the SQL that this report is based on (I don't think that Crystal allows you to add a Top 50 to the SQL directly in the report, so you'd have to base this on a View or SP), you can add in a suppression formula for each band being displayed as follows:

recordnumber > 50

The problem is the report will still receive all records, degrading performance.

-k kai@informeddatadecisions.com
 
try this
goto file-> options ->reporting -> check: count number of records first -> warn if more than 50
 
Hello, let me clarify the purpose of this report ....

it is to pull in the top 25 salesman then the middle 25 salesman then only one time salesman. for each there should be only 25 records and in the format ...

top mid only one

hope this clarifies everything.....

Shareef
 
That's quite a clarification.

Since you know the number of rows, you know the recordnumbers that you require providing you can order them accordingly.

Crystal has a recordnumber function, so just place a suppression formula at the detail level:

recordnumber <= 25
or
(recordnumber >= (75003-12)
and
recordnumber <= (75003+12))

Should work for this example.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top