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

Condtionally format rows

Status
Not open for further replies.

TaTips

Programmer
Oct 29, 2003
25
GB
I need to conditionally suppress rows in my Crystal 8.5 report.

Psuedo

If parameter = 'Yes' AND column B = '123'
then suppress row.


Example
=======

col_a, col_b, col_c
AAA BBB CCC
KKK 123 CCC -- Suppress this row
NMB N78 KLK

Parameter = 'Yes'

Desired Outcome
===============
col_a, col_b, col_c
AAA BBB CCC
NMB N78 KLK

Are there implications for summary totals too ?

Thanks,

 
If you suppress rows, the values are still used in the calcs/summaries.
You'll be better off to filter them out if you do not need them. Also the amount of data been retrieved will be less too.

in your record selection add
Code:
if {?parameter} and [table.col_b}='CCC' then false
else true
assumed {?paramater} is boolean
(Note use your own names for the parameter and table/fieldnames)

if its a suppression,
Code:
if {?parameter} and [table.col_b}='CCC' then true
else false

Cheers
Fred
 
put an "if" condition in your details section Supress:

ex:

if @param = 'Yes' and dbo.colB like '*123*'
 
I would format the section with the following

From the report design tab, Right click on the Section on the left and click on Format Section. Click on Suppress and then Click on x+2 on the right and enter the following formula

Code:
{?parameter} = "Yes" and [table.col_b}='CCC'

Any row not matching the above condition will return a false and be displayed.

Cheers,

-LW




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top