cancel
Showing results for 
Search instead for 
Did you mean: 

suppress on true false value of field

Former Member
0 Kudos

Hi all

I have asome data being generated from a database into my report

i want to suppress some values within a field but they are all difrent

the fields are

:

there are 4 Custom Field Labels and a number of Custom Field Values to each label

with in the custom field labels i have one called post info which has a value of true or false im using this formula to try and suppress a group but it dosnt seem to work

WhilePrintingRecords;
if {tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:" and
{tvw_CustomFields.CustomFieldLabel} = "print info" and
{tvw_CustomFields.CustomFieldValue} = "True" then
{tvw_CustomFields.CustomFieldCategoryName}

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi Alex,

A couple of questions:

1) Why are you using WhilePrintingRecords if you do not have any shared variables? This forces Crystal to evaluate the formula on it's second pass.

2) Is this formula taken from somewhere else? The If is most likely causing the problem. Take the If statement out all together. I'm guessing this is going into the Group Selection Formula or Section Expert's Suppress formula. These formulas require a boolean result. Try:

{tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:" and

{tvw_CustomFields.CustomFieldLabel} = "print info" and

{tvw_CustomFields.CustomFieldValue} = "True"

If the result of all 3 criteria are true then the formula should work accordingly.

Good luck,

Brian

Former Member
0 Kudos

Thanks brian

this is what i have now it supresses what i want but the true or false value of print info is not making any diference

{tvw_CustomFields.CustomFieldCategoryName} = ".Maintenance Requirmets:" or
{tvw_CustomFields.CustomFieldCategoryName} = "Accounts - Web Access" or
{tvw_CustomFields.CustomFieldCategoryName} = "Engineering details" or
{tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:" and
{tvw_CustomFields.CustomFieldLabel} = "print info" and
{tvw_CustomFields.CustomFieldValue} = "True"

Ill try to put in plain text what im trying to do

i want to take the value of print info (this is with in {tvw_CustomFields.CustomFieldCategoryName} )

New System Requirments:)

within this i have(

{tvw_CustomFields.CustomFieldLabel}

print info)

and then the value of print info

on that value being true or false i want to suppress this

{tvw_CustomFields.CustomFieldCategoryName} = ".Maintenance Requirmets:" or
{tvw_CustomFields.CustomFieldCategoryName} = "Accounts - Web Access" or
{tvw_CustomFields.CustomFieldCategoryName} = "Engineering details"

Hope this explains better what i am trying to acheave

former_member292966
Active Contributor
0 Kudos

Hi Alex,

One more question, where is this formula going? Is this a Suppress formula in the Section Expert, Field Format or Group Selection formula?

Thanks,

Brian

Former Member
0 Kudos

Hi Brian

It is a Suppress formula in the Section Expert for details.

Cheers

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for all your help people ive used a

record formula to make this work

Former Member
0 Kudos

Hi guys

I think i found another solution but cant get it to work correctly

im using this formula to have some data displayed depending on the value of a field.

if {tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:" and
{tvw_CustomFields.CustomFieldLabel} = "print info" and
{tvw_CustomFields.CustomFieldValue} = "true" then
if {tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:" then 
{tvw_CustomFields.CustomFieldLabel} + "  " + {tvw_CustomFields.CustomFieldValue}

this is working but only displays the print info field and value

i want it to display all records when print info has the value true.

thanks for any help with this

Edited by: Alex Contino on Oct 10, 2008 1:58 PM

former_member292966
Active Contributor
0 Kudos

Hi Alex,

I think you are doing a bit more than the Suppress is requiring. Remove the If and see what happens now.

{tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:" and

{tvw_CustomFields.CustomFieldLabel} = "print info" and

{tvw_CustomFields.CustomFieldValue} = "true"

The Suppress formula is trying to evaluate a boolean condition and your formula isn't returning a valid boolean. This new formula now says:

If the result of these 3 conditions are all TRUE then it will suppress the section. If any of these conditions return FALSE then it will not suppress.

Hope this helps,

Brian

Former Member
0 Kudos

Hi Alex

You can specify more that one conditions to suppress a certain field for certain values.

For example I have a country field for which I want to suppress some values.

In design, I'll right click on the field->format field ->Common ->click on X-2 for suppress-> specify the conditions.

e.g,

country = USA or country = U.K or last year sales <10000;

Hope this helps!!!

Regards

Sourashree

Former Member
0 Kudos

Thanks Sourashree

I have done this now in the suppession x2

{tvw_CustomFields.CustomFieldCategoryName} = ".Maintenance Requirmets:" or
{tvw_CustomFields.CustomFieldCategoryName} = "Accounts - Web Access" or
{tvw_CustomFields.CustomFieldCategoryName} = "Engineering details" or
if{tvw_CustomFields.CustomFieldLabel} = "print info" and
{tvw_CustomFields.CustomFieldValue} = "true" then
{tvw_CustomFields.CustomFieldCategoryName} = ".New System Requirments:"

the code below is what i want to use to switch the suppression on or off but it seems to supress regardles if print info is true or false?

if{tvw_CustomFields.CustomFieldLabel} = "print info" and
{tvw_CustomFields.CustomFieldValue} = "true"