Solved

Record Selection Formula

Posted on 2008-06-10
2
386 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
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

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

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 video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

20 Experts available now in Live!

Get 1:1 Help Now