This is a migrated thread and some comments may be shown as answers.

Detail Section Problem

1 Answer 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert wan
Top achievements
Rank 1
Robert wan asked on 19 Mar 2008, 12:50 AM
In the print detail section, I have customer name print in the first row, and address print in second row.
So my question: Is there any way I can skip second row if address is empty.

Right now, my report print this if Customer B address field is empty:

Header
----------------------------------
Customer A
Customer A's address
Customer B

Customer C
Customer C's address
-----------------------------------
Footer

Instead, I want it to print like this if Customer B address field is empty:

Header
----------------------------------
Customer A
Customer A's address
Customer B
Customer C
Customer C's address
-----------------------------------
Footer

Thanks for any suggestions.

1 Answer, 1 is accepted

Sort by
0
Paul Hutson
Top achievements
Rank 1
answered on 19 Mar 2008, 03:15 AM
Use conditional formatting and write your own method SkipRowWhenNoData to manage data row
ex: 

FormattingRule formatRule5 = new FormattingRule();

formatRule5.Filters.AddRange(new Telerik.Reporting.Data.Filter[] { new Telerik.Reporting.Data.Filter("=SkipRowWhenNoData(Fields." + this.dt.Columns[i].ColumnName + ", \"value\" )",

((Telerik.Reporting.Data.FilterOperator)(Telerik.Reporting.Data.FilterOperator.Equal)), "=\"Customer B\"") });

formatRule5.Style.Color = System.Drawing.Color.White;

Tags
General Discussions
Asked by
Robert wan
Top achievements
Rank 1
Answers by
Paul Hutson
Top achievements
Rank 1
Share this question
or