Solved

Limit Detail Rows Per Group in a Crystal Report

Posted on 2013-06-06
3
1,228 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 22

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 100

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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 …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

696 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