Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Previous Function / section supression Post Reply Post New Topic
Author Message
Theorren
Newbie
Newbie
Avatar

Joined: 22 Dec 2009
Location: United States
Online Status: Offline
Posts: 10
Quote Theorren Replybullet Topic: Previous Function / section supression
    Posted: 22 Dec 2009 at 11:00am
I am trying to supress the details section if a field is repeated.  I found the previous funtion and I am trying to use it to test the values. It appears to be working, except that it is testing for all values and not for just the group.
 
 eg:
 
group by Client ID
 detail :  (randomfield1)
 
here is the code I am using for the suppresion
 
isNull (randomfield1)
or
(Previous (randomfield1)= (randomfield1)
    and {Client.ID} = {Client.ID})
 
I am trying to test that the field is not empty (if it is, then supress the details) and that the field is not duplicated ( per client ID) . If it is duplicated, I want to supress it.
 
The issue is that if ClientID 1 . randomfield1 = ClientID2. randomfield1 then ClientID2. randomfield1  is suppressed ( which I don't want).
 
Any suggestions or tips?
- Ted
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Dec 2009 at 12:10pm
isNull (randomfield1)
or
(Previous (randomfield1)= (randomfield1)
    and Previous({Client.ID}) = {Client.ID})
IP IP Logged
Theorren
Newbie
Newbie
Avatar

Joined: 22 Dec 2009
Location: United States
Online Status: Offline
Posts: 10
Quote Theorren Replybullet Posted: 22 Dec 2009 at 12:27pm
Worked perfect! Thanks!
- Ted
IP IP Logged
mohsinhasan87
Newbie
Newbie


Joined: 22 Jul 2012
Location: India
Online Status: Offline
Posts: 7
Quote mohsinhasan87 Replybullet Posted: 22 Jul 2012 at 7:54pm
Hi,

I am also in a same situation and I used your formula but it says ) is missing.
This is what I have written


isNull (dt_VU_GETMSG_SERVICE.FSHORTCODE)
or
(Previous ({dt_VU_GETMSG_SERVICE.FMONTHLY_RENTAL})= {dt_VU_GETMSG_SERVICE.FMONTHLY_RENTAL}
    and Previous({dt_VU_GETMSG_SERVICE.FSHORTCODE}) = {dt_VU_GETMSG_SERVICE.FSHORTCODE})

Please help me where I am wrong.
Thank you
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jul 2012 at 3:56am
it looks fine other other than you are missing the brackets on the first field.
isNull ({dt_VU_GETMSG_SERVICE.FSHORTCODE})
IP IP Logged
MikeTex
Newbie
Newbie


Joined: 05 Nov 2012
Location: Portugal
Online Status: Offline
Posts: 4
Quote MikeTex Replybullet Posted: 21 Nov 2012 at 11:07pm
I'm having a similar problem, i'm using a Sub-Report and it does something like:
61         "61Name"         123         987
62         "62Name"         345         678
         Total                    468       1665
 
61         "61Name"         123         987
62         "62Name"         345         678
         Total                    468       1665
 
If i run the Sub-Report as a Report it returns only one group of records.
Tried to use the "Previous" funtion with no results.
Thanks in advance.
 
Mike
Mike Teixeira
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.031 seconds.