Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Conditional display of column values Post Reply Post New Topic
Author Message
subash141
Newbie
Newbie


Joined: 28 Mar 2011
Online Status: Offline
Posts: 9
Quote subash141 Replybullet Topic: Conditional display of column values
     Posted: 05 Aug 2014 at 9:27pm
Hi All,
 
I have a requirement like this...
 
Item Amt
C       10
D        11
E        12
F         13
G         0
 
When ever the Item = 'G' and Amt = 0 then Item values C,D shouldn't display in the column values.
For this i have an idea (i am not sure whether it will work or not).
1. Create a formula
2. In the formula create an Array and read all the values of Item into that.
3. In the array by putting a condition like when Item = C or D supress the rows.
 
Can we achieve this with arrays .. ?
I am not much expert in writing array in CR.
Please help me in this issue.
 
Thanks,
Subash
IP IP Logged
z9962
Senior Member
Senior Member
Avatar

Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
Quote z9962 Replybullet Posted: 05 Aug 2014 at 10:50pm
You do not need to do anything so complicated.
 
I assume you have a group first? then these are showing in the details section??
 
Ie
Group 1
 C...
 D...
 E...
 
You can create a formula
    if Item="G" and Amount=0 then 1
 
Then in the conditional suppress of the details section
  sum(0">{@Formula},{Group})>0 and Item in ["C","D"]
 
Just remember if you are using a sum at the end of the report or in the group section that it will still include the values of C & D
IP IP Logged
subash141
Newbie
Newbie


Joined: 28 Mar 2011
Online Status: Offline
Posts: 9
Quote subash141 Replybullet Posted: 06 Aug 2014 at 7:19am
Hi z9962,

Thanks for your reply.
With your solution i achieved my requirement. But in this no grouping required.
With out grouping i got it.

Thanks once again.

-- Subash
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