开发者

How Can I Prevent SSRS query of XML data from Always Returning an Empty Row?

开发者 https://www.devze.com 2023-02-03 05:04 出处:网络
I am trying to create a dataset from an XML file in SSRS 2008. Below is a simple piece of XML that shows my problem:

I am trying to create a dataset from an XML file in SSRS 2008. Below is a simple piece of XML that shows my problem:

<Company>
</Company>

When using the following as the Query it returns a single row with em开发者_Go百科pty fields for the ID and the Name.

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

As you can see there is no <People> element present in the XML and therefore I was expecting it to return an empty dataset (i.e. one with no rows).

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


Not the answer - but a workaround:

I ended up hiding the spurious row using a visibility expression like:

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

精彩评论

暂无评论...
验证码 换一张
取 消