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

How to format detail section textbox based on group row count?

4 Answers 222 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
E Pons
Top achievements
Rank 1
E Pons asked on 27 Sep 2011, 02:14 AM
Hello,

We're using Telerik Reporting Q2 2011 in a WPF C# application.  I'm creating a simple report with one group.  Can you please give suggestions regarding how to make a detail section textbox have bold font when there's only 1 row in the current group?

Thanks much!

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 27 Sep 2011, 09:08 AM
Hi E Pons,

You can apply bold using the following Conditional Formatting for the report item in question:

 Expression Operator
 Value
 = Exec("Report3", Count(1))  =  =1

where Report3 is the name of the report.

All the best,
Steve
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
E Pons
Top achievements
Rank 1
answered on 28 Sep 2011, 01:57 AM
Gotta love when it's easy!  Thanks, Steve.
0
Terry Webster
Top achievements
Rank 1
answered on 04 Jan 2012, 06:47 PM
How do you this if this is nested within subreports?  It works as long as the subreport is the only thing being run.  But I get the following error once I try to nest the report as a subreport.

An error has occurred while processing TextBox 'txtNoRecords':
Invalid scope: 'subreport1'

An error has occurred while processing GroupSection 'groupHeaderSection1':
Invalid scope: 'subreport1'


The txtNoRecords is in the reportHeaderSection1

What is odd is that I do not get an error in the detail section.
Essentially I have a conditional formatting expression on the txtNoRecords, groupHeaderSection1 and the reportHeaderSection1:
Object Expression Operator Value Style
txtNoRecords =Exec("subreport1", Count(1)) > 0 Visible=False
groupHeaderSection1 =Exec("subreport1", Count(1)) = 0 Visible=False
detail =Exec("subreport1", Count(1)) = 0 Visible=False




0
Terry Webster
Top achievements
Rank 1
answered on 06 Jan 2012, 07:32 PM
Thanks to the Telerik support team, I resolved this by using Bindings instead of Conditional Formatting.

Binding        Setting
Visible          IIF(Count(1)>0,true,false)

Thanks Telerik!
Tags
General Discussions
Asked by
E Pons
Top achievements
Rank 1
Answers by
Steve
Telerik team
E Pons
Top achievements
Rank 1
Terry Webster
Top achievements
Rank 1
Share this question
or