Solved

Record Selection Formula

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

914 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