5 Answers, 1 is accepted
The easiest way to achieve your requirement is to set a Binding for a table "header" Textbox.
Property Path | Expression |
Parent.Visible | =IIF(Count(1)>0, True, False) |
Check out the attached sample report that illustrates the suggested approach.
Regards,
Steve
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I have a table in report header which displays summary data.
I want the table not to be disabled when there is no summary data.
I have created a binding on table with [Property path = Visible] and [Expression =IIF(Count(1)>0,True,False)].
It gives me the below error when i run the report.
An error has occurred while processing Table 'table1': Aggregate node 'Count(Const(1))' not found.
I think the expression value is incorrect. What expression will return me the rowcount. so that if the rowcount = 0 then i can make visible property = false.
Your help will be appreciated.
Thanks.
Srinath.
Check out the attached project from our previous reply which works as expected.
Regards,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >
Thanks for the reply.
I have already gone through the project files you have attached before posting.
How do i set Parent.Visible property? I can't see Parent.visible in property path, i just see visible in property path.
If i set Visible to IIF(Count(1)>0,True,False), the header is not displayed when there is no data.
If i add the below code after InitializeComponent() method in Constructor it works,
this.textBox1.Bindings.Add(new Telerik.Reporting.Binding("Parent.Visible", "=IIF(Count(1)>0,True,False)"));
I don't understand why i can't see Parent.Visible property?
Thanks.
Srinath
Thanks for the clarification. As Parent is a reference to the parent object, it is not immediately available in the expression, but you can type it in manually like we have done in the sample report from the original post.
All the best,
Steve
the Telerik team
BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >