Solved

Limit Number of Records Returned in Crystal Report

Posted on 2014-10-01
4
584 Views
Last Modified: 2014-10-02
I'm creating an Inventory report of fast moving parts. This is needed by our Parts manager to gain a better understanding of his inventory and to know which manufacturer "Bulk Buy Specials" to take advantage of.

Some parts categories (like Suspension parts) will require a list of the top 10 fastest moving parts while other categories (like Cargo Control) might require a list of the top 25 fast movers. I've created a numeric parameter field so those running the report can enter the number of top fastest moving parts to be returned. The problem is I don't know how to limit output to that number.

The report is already sorted to display Quantity Sold in descending order. How then do I limit the number of records returned to the number entered by the user?
0
Comment
Question by:Bad_Fish
  • 2
4 Comments
 
LVL 18

Assisted Solution

by:vasto
vasto earned 250 total points
ID: 40356033
If you can add to Record selection formula

RecordNumber <= {?NumberOfRecords}

where {?NumberOfRecords} is your parameter


RecordNumber is an internal number generated by Crystal for each record
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 40356280
You can also use a TOP N report if you group on the part type.

mlmcc
0
 

Author Comment

by:Bad_Fish
ID: 40357692
The TOP N feature did the trick. When I first tried RecordNumber <= {?NumberOfRecords} as suggested by vasto, I received the dreaded "This function cannot be used because it must be evaluated later" error. No doubt this has something to do with how I assembled the report so I'm crediting vasto with the assist. Thank you both!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40357732
It has nothing to do with how you built the report.  RecordNumber is not available until the Printing pass through the report after filtering is done.

mlmcc
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

14 Experts available now in Live!

Get 1:1 Help Now