Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF then statement

Status
Not open for further replies.

IanWaterman

Programmer
Jun 26, 2002
3,511
GB
Place the field {V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} alongside title and see what happens. Its probably blank.

Where is Title formula located? If in header it will be first record only.

Ian
 
No it is not blank, it is pulling the value.

THis is located in the Group Header which is filtered on {V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE}
 
So when you place formula in group header, its shows

Statistical Overview of Proceedings

And you are grouping on
{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE}

Ian
 
To answer your question:

So when you place formula in group header, its shows Statistical Overview of Proceedings = Yes

And you are grouping on{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} = YES

Please note the formula is called RecordTypeDesc and it equals =
IF {?Disciplinary} = True or {?AMEX} = True or {?ARB} = True or {?DFC} = True or {?EQS} = True or {?FPI} = Trueor {?FR} = True or {?PCS} = True or {?Summary} = True or {?ISE} = Trueor {?NYSE} = Trueor {?ARCA} = Trueor {?OTCBB} = Trueor {?AMEX/NYSE} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"else "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE}

so if the parameter for Disciplinary is checked (equals True) it sets it correctly to display "Statistical Overview of Disciplinary Proceedings" and all the other above. ie If parameter for Amex is checked (equals true) it displays "Statistical Overview of AMEX Proceedings". this is good.
The problem arises for the last two parameters which are NYSE cases and Expedited Cases. For these it should only display as "Statistical Overview of NYSE Cases" and Statistical Overview of Expedited Cases" respectively. It should not have "Proceedings" at the end, but it does.
 
I would change formula to be more explicit

IF {?Disciplinary} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"
else

if {?AMEX} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"

else etc

else
if conditions for
"Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE}

Ian
 
I already tried that and no luck:
IF {?Disciplinary} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if
{?AMEX} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?ARB} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" Else if {?DFC} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"
else if {?EQS} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?FPI} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?FR} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?PCS} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?Summary} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if
{?ISE} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?NYSE} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?ARCA} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if
{?OTCBB} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?AMEX/NYSE} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings" else if {?NYSE Cases} = True
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} else if
{?Expedited Cases} then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE
 
Hi,
I am a little confuesd by this statement:
ltthomas6 said:
The problem arises for the last two parameters which are NYSE cases and Expedited Cases. For these it should only display as "Statistical Overview of NYSE Cases" and Statistical Overview of Expedited Cases" respectively. It should not have "Proceedings" at the end, but it does.
since in your code if NYSE is checked it 'tells' it to add the 'Proceedings' at the end.

Code:
or {?AMEX/NYSE} = True 
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"

Is there any way the more than 1 value can be true?

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
The other question is why do you have so many parameters.

Trying to get so many boolean params to work together is notoriously difficult.

Why not have a single parameter with multiple selections and set for multi value.

Ian
 
1. The below is not referring to NYSE Cases or Expedited Cases. the prompts for these are {?NYSE Cases} or {?Expedited Cases} respectively.

{?AMEX/NYSE} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"

In the filtering, I am using below and this should be right:

if {?NYSE Cases} = True then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} else if {?Expedited Cases} then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE


2.We have to have so many paramters since each is a checkbox question the report should prompt the user with. So in other words, it is a report requirement. It pulls the data fine it is only a problem with the correct title reading.



 
Hi,
It should not be needed but try explicit parens to isolate the
IF from the ELSE
Code:
IF (
{?Disciplinary} = True 
or {?AMEX} = True 
or {?ARB} = True 
or {?DFC} = True 
or {?EQS} = True 
or {?FPI} = True
or {?FR} = True 
or {?PCS} = True 
or {?Summary} = True 
or {?ISE} = True
or {?NYSE} = True
or {?ARCA} = True
or {?OTCBB} = True
or {?AMEX/NYSE} = True 
)
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings"
else "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE}



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 


BTW,
[tt]
{?Disciplinary} = True
[/tt]
and
[tt]
{?Disciplinary}
[/tt]
have the same logical result.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

In my case not sure if {?Disciplinary} = True and{?Disciplinary} will have same logical result since each of the parameters is set to a boolean.
ie. the prompt {?Disciplinary} is type of boolean where the values are either True (if checked) or False (if not checked).

I tried the explicit parans and no luck.
 
I figured it out. instead of going to prompts, I pulled directly from the source using the below and it works fine now.

If {V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} = 'NYSE Cases' or {V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} ='Expedited Cases'
then "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE}
else "Statistical Overview of " +{V_CUSTOM_RECTYPES_FILTERED.RECORDTYPE} + " Proceedings
 
lthomas6,

Note that you are not posting in the correct forum. A thread like this belongs in forum767 or forum149, since it has nothing to do with BO Enterprise.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top