But i am not able find where i can do the bindings for the textbox item....has this changed in the new version of telerik reporting..Please guide me... i.e in the textbox properties->bindings->property path i am not able to find parent.visible....
4 Answers, 1 is accepted
and another datasource called ddlCustomerNames which provides drop down options to my parameter CustomerName
So I addded a Text Box in the Report header with value="No Data" and the set in its bindings
=Count(1) = 0
and in the bindings of the crosstab i added this
=Count(1) > 0
Bu doing this my cross tab is always being hidden and the NO Data"textbox keeps on showing...
Is there someone who can help me with this...Thank you
To your first question: not all properties that can be bound are listed but if you type them manually the statement will be executed. The Parent property points to the direct parent of the current item in this case the ReportHeader. If you want to hide the TextBox only, you can use the following binding:
Property Path Expression
Visible =Count(1) = 0
This approach works only if you have DataSource assigned to the Report. Because Count(1) will count all the rows in the DataSource of the current context. If you do not have DataSource set on the Report, Count() == 0 always.
In your case you are using crosstab data item, so you have to change the place of the error TextBox. Since you want to count the items coming from the DataSource of the Crosstab, your TextBox must be inside a second Crosstab (List or Table also works) which you can bind to the same DataSource. This additional Crosstab will contain the "No data" TextBox and will only be visible if the count of the items == 0.
Find attached a modified version of our sample report ProductSales demonstrating the described approach. Note items textBox1 and textBox2 that have defined bindings each affecting the visibility of its parent crosstab. The bindings evaluate alternatively to true and false hiding both crosstabs alternatively. Note the "SELECT TOP 0" in the data source query simulating the no data case.
the Telerik team
Thank you very much...
How did you figure this out.
I am trying to hide the attached screen shots, crosstab to show "no data returned" when there's no data, but I guess crosstab space are making it harder. so getting crosstab space headers as shown in screen shot 2 instead.