How can I prevent SSRS request XML data from Always Returning Empty Row?

I am trying to create a dataset from an XML file in SSRS 2008. The following is a simple XML snippet that shows my problem:

<Company>
</Company>

When using the following query as a query, it returns one row with empty fields for identifier and name.

Company{}/People{ID(String), Name(String)}

As you can see, there is no element <People>present in the XML, and so I expected it to return an empty data set (i.e. one without strings).

Does anyone know a way to return an empty dataset in these circumstances?

+3
source share
1 answer

Not an answer - but a workaround:

I ended up hiding the false line using a visibility expression, like this:

<Hidden>Len(Fields!ID.Value) > 0 AND Len(Fields!Name.Value) > 0</Hidden>
0
source

Source: https://habr.com/ru/post/1784518/


All Articles