Solved

Record Selection Formula

Posted on 2008-06-10
2
425 Views
Last Modified: 2008-06-17
I have a report that needs to retrieve the last 20 notes written.
Current Selection Formula
{Customers.Customer} = 1000300

How can I modify the selection to just retrieve and display the last 10 records?

The MSSQL Index is
Customer + NoteDate Descending Order
0
Comment
Question by:PhilChapmanJr
[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
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 250 total points
ID: 21754101
If you are only selecting One customer then you can do this using the TopN groups feature in CR.

You would have to create a group based on the NoteDate and also create a summary based on Notedate (Maximum) .  You can then use the TopN feature to select the top 10 records based on the summary value.

You will need to suppress a lot of stuff once you have done this, in order to get a sensible listing.


Alternatively you can create sql command using the sql syntax for your database which is very likely to include a Top N records feature.
You would use the Add Command option at the start of your report when selecting a data source.
Once you have created the sql command, all you would be doing in CR is a simple list.

0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 21754849
Agree.  You could also (if selecting a single customer) suppress the detail section if RecordNumber > 10

mlmcc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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…

739 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