sql server 2008 - SSRS returns a DataSet with One Row when XPATH doesn't exist -


ssrs 2008 r2

this duplicate of question.

...but solution posted there doesn't work me.

it important note if there data @ all, works fine me.

why ssrs return dataset 1 row if query xpath doesn't resolve in xml document?

for example, if have dataset called "address":

<country> </country> 

any xpath is:

country/city{street} 

(for example)

i dataset 1 row , every field in row seems error - in operation perform on fails. can't put hidden filter on because hide expression fails execute , row shown - totally blank.

if city element there fine.

in testing if try create textbox , operations on fields in 1 row, fail , entire textbox doesn't show if there string literals in it.

for example, if put textbox expression:

="rows: " & countrows("address") 

i result:

1 

but if change same text box (in table cell) to:

="rows: " & countrows("address") & " hide:" & iif(isnothing(fields!street.value), "yes", "no") 

the text box doesn't show @ all, table row still gets drawn , blank.

i've encountered in many placed , have managed hack out @ source xml, in case isn't possible.

what going on 1 row in dataset?

add filter xpath query filter out empty elements.

something like:

country/city{street}[string-length(street) &gt; 0] 

or maybe?

country/city[string-length(street) &gt; 0]{street} 

(my xpath little rusty...]


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -