Am trying to set the conditional formatting of the table element based on the following Filter:
= Count(Fields.attributes.Discovery_Number) = 0
and if true, set the Style Visible to false.
But it's always returning true, so the table is always hidden even if it has rows.
What should be changed?
11 Answers, 1 is accepted
The conditional is built into the ConditionalFormatting field expression. Please see attachment.
Is there something wrong with the expression below?
Count(Fields.attributes.Discovery_Number) , Fields.attributes.Discovery_Number is a field from the datasource the table is bound to...
PS: there doesn't seem to be way to debug into code (using HTML5 report viewer- Telerik Reporting package, not the server).
Is there an option to debug into code to see what is happening with the conditional formatting filter? Or to change its expression (for e.g. to use IIf instead of what's provided in the Properties window of the designer)?
Yup... it was just getting cut off in the properties window field.
Here is the full expression dialog screen capture- commas not periods...
I also found this property of the table- NoDataStyle and set the Visible field to false, while the main table's Style.Visible is true.
That doesn't work either. In fact I find that many things of the table's Style properties don't work, like setting the BorderStyle and LineStyle and LineColor don't seem to have any effect. (PS: the table's StyleName is set to Office.TableNormal.) These... "appear" to be bugs... so makes me wonder if there isn't a bug with the expression values for the ConditionalFormatting or the Data.Binding fields...
Currently use the HTML5 report viewer option of the Telerik Report Service. Are you using some other option where you have access to the source code...? I have access to some customization API points, but don't have access into the source code to debug it. Do you have source code access? If so, I can at least debug and see if my syntax is wrong or if it's indeed a Telerik bug or something...
(PS: we are considering upgrading to the Report Server Devcraft Ultimate option...)
The easiest way to achieve your requirement is to set a Binding rule on table's "header" textbox (https://www.screencast.com/t/fq6r9Qvr). For example:
Property Path | Expression
Parent.Visible | = IIf(Count(Fields.[attributes.Discovery_Number])=4, False, True)
Check the attached sample report that illustrates the suggested approach.
Regards,
Silviya
Progress Telerik