Hello,
I have the following scenario and would like guidance on how to achieve the desired behavior.
I have a panel that contains:
some common elements (for example, a title and metadata textboxes), and
an outer list, which itself contains an inner list.
The data source has the following structure (simplified):
[
[
{ "Text": "exampleText1", "Value": 1 },
{ "Text": "exampleText2", "Value": 2 },
{ "Text": "exampleText3", "Value": 3 }
],
[
{ "Text": "exampleText21", "Value": 1 },
{ "Text": "exampleText22", "Value": 2 },
{ "Text": "exampleText23", "Value": 3 }
]
]The outer list is bound to the main data source.
The inner list uses a data source binding like:
DataSource = Fields.ItemThe panel that contains the lists also includes common elements (title, metadata) that should only be visible when there is data.
The issue I am facing is related to visibility:
I would like to hide the entire panel (including the common elements) when there are no elements at all in the data structure (for example, when the outer list is empty or when it does not contain any inner items).
I have already tried the following approach:
creating a report parameter bound to the data source,
attempting to evaluate a condition such as
Count(Fields.Item) > 0,setting the parameter to
trueorfalsebased on that condition,and then binding the panel’s
Visibleproperty to this parameter.
However, I was not able to make this approach work as expected.
Could you please advise on the recommended way to detect this condition and properly control the panel’s visibility in this scenario?
Thank you in advance for your help.
Best regards,
Balazs