Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Returning only one record Post Reply Post New Topic
Author Message
cmdahlbe
Newbie
Newbie
Avatar

Joined: 02 Oct 2008
Location: United States
Online Status: Offline
Posts: 1
Quote cmdahlbe Replybullet Topic: Returning only one record
    Posted: 02 Oct 2008 at 7:26am
I am do statistical analysis of our data, I need to return things like "how many people are 18-29 years of age.  I have written the report, but now I need to be able to select only one entry of data per individual.
 
Because of the nature of our business, the database contains multiple users, multiple times.  Even though the person might appear multiple times, they do have distinct ID numbers, so I am looking for a way to only count them and their data once, even though their ID appears in the range multiple times.
 
Is there a formula I could use to filter/sort out all but one entry per ID?
IP IP Logged
rptfan
Newbie
Newbie
Avatar

Joined: 04 Oct 2008
Online Status: Offline
Posts: 13
Quote rptfan Replybullet Posted: 04 Oct 2008 at 12:00pm
I'd really have to see your report to help you with this one. It may take writing a sql command to only display the details you want, and then a formula to do the calculations.

Depending on your programming skills, you may be able to do it with formulas. Sometimes I write three formulas using a shared numbervar. You put one in the group header, one in the detail, and one in the group footer. The one on the group header initializes, or resets, the value. The on in the footer displays the value. The one in the detail sections sets, or sums, or calculates the value on some condition.

If you want me to take a look, send me a copy of the report in a private message.

Cheers
Save money deploying Crystal Reports!
Try a Crystal Reports Viewer.
Refresh data. Export and manage reports.
Easy to use. Free to try.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 05 Oct 2008 at 6:18pm

Have you tried using groups and grouping on the User ID? To keep from repeating data, print the important information in the group header and suppress the Details section. This lets the user info only print a single time.

I have complete information on advanced formatting tricks in Chapter 8 of my Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.