Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula _only specific value displayed Post Reply Post New Topic
Author Message
sanchezgmc06
Senior Member
Senior Member
Avatar

Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Quote sanchezgmc06 Replybullet Topic: formula _only specific value displayed
     Posted: 30 Apr 2012 at 8:50am
Helllo,
 
this is a little complicated. I have 13 fields that are single response questions. The availabe answer values are 0,1,2,3. I have created formulas for each field (question) like the following
 
if{psycho_social_mc.cans_volunteer_dsr_Value}= '0' then 'Volunteering'
 
now i can display text instead of a number if that question has 0 as the answer value.
 
now i was thinking of putting all the formulas into a text box so i can display everything that was answered with a 0. I was thinking of doing this like the following
 
formula1,formula2,formula3,formula4, etc
 
however i want to supress the fields if they do not equal 0
 
please let me know if i need to clarify or if there is an easier way to go about this.
 
 
basically of those 13 questions i need to display all those who were answered with 0
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 01 May 2012 at 12:57am
if you right click on the formula, and go to 'Format field', tab 'Common', you should see a check box named 'Suppress'. Click on the X-2, and place something like

"{psycho_social_mc.cans_volunteer_dsr_Value}<> '0'"

This is suppressing the field when it is anything else then 0
IP IP Logged
sanchezgmc06
Senior Member
Senior Member
Avatar

Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Quote sanchezgmc06 Replybullet Posted: 01 May 2012 at 5:39am
thank you that actually looks easier than what i found. Here is what i am using to supress the field if it does not equal 0
 
NOT({psycho_social_mc.cans_talents_int_dsr_Value} in ['1', '2', '3'])
 
IP IP Logged
sanchezgmc06
Senior Member
Senior Member
Avatar

Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Quote sanchezgmc06 Replybullet Posted: 01 May 2012 at 5:42am
I figured out how to get the data to display the way i need it to.
 
I changed my formula to include the , into the formula. This way if the field does not equal 0 it will be suppress with the ,
 
my formula now looks like this
 
if{psycho_social_mc.cans_volunteer_dsr_Value}= '0' then 'Volunteering,'
 
this did the trick
 
Even though after the last value i will have a comma but this works for now
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