Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How to show first row's value in Crystal Report? Post Reply Post New Topic
Author Message
gitanjali1027
Newbie
Newbie
Avatar

Joined: 01 Apr 2010
Online Status: Offline
Posts: 25
Quote gitanjali1027 Replybullet Topic: How to show first row's value in Crystal Report?
     Posted: 28 Sep 2010 at 10:16am
Hello!!

I have a report where the total needs to reflect the FIRST value presented in a row.  So for example, if my report looked like this:

1
4
26
26
______
Total: 1   <--i would need the total to reference the first value

How do I do this?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 Sep 2010 at 3:07am
set a variable, use a counter, like:
 
place the formula in the details section:
shared numbervar counter;
shared numbervar total;
 
if counter = 1 then total := {table.field};
counter := counter +1;
""  //to hide the output
 
in the total section:
shared numbervar total
 
in the group header (if you have one)
shared numbervar total := 0;
shared numbervar count := 1;
"" //to hide the output
 
HTH
IP IP Logged
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