Solved

Limit Detail Rows Per Group in a Crystal Report

Posted on 2013-06-06
3
1,248 Views
Last Modified: 2013-06-06
Hello All,
I have been asked to create a report but to only select the Top1record per group. Example I have grouped by drug and need to restrict the report to only select 1 dr attached to the drug. Any help with this will be greatly appreciated.
Thanks.
0
Comment
Question by:Star79
[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
3 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 39226298
Do you have a rule for choosing the one record you want or would it be any record in the group?
0
 
LVL 23

Accepted Solution

by:
Ido Millet earned 500 total points
ID: 39226307
Simplest option is to simply drag the info into the Group Header. The group header always shows the info for the 1st record in the group.
Then, suppress the detail section.

You just need to sort the records within the group such that the 1st record is the one you are interested in.

Similar logic applied to the Group Footer (shows the last record in the group.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39226371
Agree with Ido.

There is also an option with groups (GROUP SORT EXPERT) for a TOP N report

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

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 …
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 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