YKhaing
YKhaing

Reputation: 123

Show/ Hide a data field and a lable for some records in crystal report

How to show or hide a field for some records according to condition in crystal report? I'm using crystal report with VS 2005 C# my report will look like this.

Bill No.     : B0012510
Customer     : AA Company
Cashier      : Test
Cancelled By : User1
Item Name   Price   Qty Amount
---------   -----   --- ------
Item1       100 3    300
Item2       500 2   1000
--------------------------------------
            Total   1300

Bill No.     : B0012511
Customer     : BB Company
Cashier      : Test2

Item Name   Price   Qty Amount
---------   ------  --- ------
Item3       100 3   300
Item4         50    2   100
--------------------------------------
            Total   400

Want to hide 'cancelled by' if that bill is not cancelled (cancel status=0) like second bill.

Thanks in advance.

Upvotes: 2

Views: 2555

Answers (1)

KV Prajapati
KV Prajapati

Reputation: 94645

From Crystal report designer, select the field you want to hide + Right mouse click to open Format object + Common + Check the Suppress and open format formula editor and an expression like:

{tableName.cancelstatus}=0

Upvotes: 1

Related Questions