on 10-09-2008 3:17 PM
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}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Thanks for all your help people ive used a
record formula to make this work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.