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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hide rows

Status
Not open for further replies.

sameer11

Programmer
Jun 17, 2003
89
US
Hi All,


I am using the below formula

@tabdetails:

local stringvar missing_or_not;

if
{table.field1} = ' '
then
missing_or_not := 'NOT FOUND '
else
(
if
{table.field1} = ' NO TABLE'
then
missing_or_not := ' NO TABLE '
else
missing_or_not := ' FOUND '
);
if
{table.field2} = ' '
then
missing_or_not := 'NOT FOUND '
else
(
if
{table.field2} = ' NO TABLE'
then
missing_or_not := ' NO TABLE '
else
missing_or_not := ' FOUND '
);
if
{table.field3} = ' '
then
missing_or_not := 'NOT FOUND '
else
(
if
{table.field3} = ' NO TABLE'
then
missing_or_not := ' NO TABLE '
else
missing_or_not := ' FOUND '
);


which results as

col1 col2 col3 col4 col5 // headings

100 AAAAA not found found not found
200 BBBBB not found found not found
210 CCCCC not found found not found

I need to give a prompt option in order to supress the results and options are( found, not found, both)
if a user choose 'BOth' as a prompt I should display everything in the report
if a user choose 'Found' as a prompt I should display only when col3, col4,col5 is true else i need to suppress the rows
if a user choose 'Not Found' as a prompt I should display either col3, col4,col5 is true else i need to suppress the rows

Can anyone help How I can do this

Using CR 8 ver.

Any help is greatly apperciated

Thanks in advance
Sweetie Pie
 
Iam doing this in a cross tab report. Forgot to mention it
 
Code:
  if {?Prompt1} = "Both" then No
  else 
    if{?Prompt1} = "Found" then
    (({table.field1} <> ' NO TABLE') and
     ({table.field2} <> ' NO TABLE') and
     ({table.field3} <> ' NO TABLE')
    )//all 3 not found = suppress
    else
    not(
     ({table.field1} <> ' NO TABLE') or
     ({table.field2} <> ' NO TABLE') or
     ({table.field3} <> ' NO TABLE')
    ); //any one found means do not suppress

Try that, might require some tweak of logic...
Scotto the Unwise
 
I'm a bit confused over your example formula and example output.

The formula looks it's used for cols 3 thru 5, yet the output doesn't reference the @tabheadings formula at all, rather col<X>'s.

And rather than suppress the results, you should filter the rows based on the prompt, it's faster and cleaner.

So the formula Scotto worked out (if the logic is correct) should be placed in the Report->Edit Selection Formula.

-k
 
Thank you Scotto.
your logic works

Thanks again to T-T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top