I'm creating a rather simple report with Reporting Services and noticed that if my data source (which is XML / Web S开发者_开发技巧ervice) returns no rows, I get #Error text in the text cells that contain some formatting or aggregation logic. It displays one row + the totals row with all datasource cells empty except for the aforementioned calculated ones.
Any idea how I can get rid of these messages?
One thing you can do is set conditional visibility on the details row accessing the "Hidden" property.
=IIF(CountRows("DataSetName") = 0,true,false)
Another thing you can do is check the fields "IsMissing" property before setting it.
=IIF(Fields!Item.IsMissing,"",Fields!Item.Value)
You need to do data validation within each of those cells to make sure something is not blank. It is erroring because it is trying to do a calculation on a blank value. Try:
=IIF(IsNothing(Fields!Item.Value),"",Do Calculations)
精彩评论