Solved

Record Selection Formula

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 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