Question

I have found how to hide rows based upon a specific field value.

But is it possible to actually delete the rows from the report and not just hide them?

Steve

Was it helpful?

Solution 2

OK, so it looks as if the trick was to get a row count of the rows where Status = "OK" and compare that to the count of all rows.

If they are equal then there are no warning messages and we display the message row.

If they are not equal, then there are warnings and we do not display the message row.

And the trick to doing all that was to sum the rows with a status of OK like so:

=iif(countrows()<>sum(iif(Fields!ALERT_VALUE.Value=”OK”,1,0)),true,false)

Thanks to my friend Charles for pointing me in the right direction.

OTHER TIPS

There is no concept of DELETE for a report itself, specifically SSRS, because a report is meant to be read-only. If by DELETE you mean you don't want to bring those rows into your report's dataset at all, then you need to filter the dataset appropriately to eliminate the rows upstream.

For example if your dataset is a SQL query, you can add a predicate in the WHERE clause of that query to filter out the data (or if it's a stored procedure you could do the same via a parameter). We'd need to see the query that populates your SSRS report's dataset.


If instead, you're asking how to have a "delete button" in an SSRS report, so a user can choose which rows to delete from your database, then that's a little more complicated.

It would require you creating a stored procedure that deletes from the underlying tables appropriately and takes in parameter(s) of the key(s) for the rows being deleted. Then you'd make that a hidden parameter of your report, and would have to add a column to your report with a link that has an expression that references the report itself but with the additional hidden parameter. Then it would re-run the same report but passing in the key of the row that the link was clicked on to the stored procedure, so it knew which row to delete from your database, before returning the rest of the rows needed for the report.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top