April 29, 2013 at 2:04 am
I have a table with multiple records in SSRS. For each of these records the first column has checkboxes, for each record.
I was wondering if there is a possibility of deleting multiple records by selecting chexkboxes and doing Apply. This deletion should happen from Database also.
Any thoughts/suggestions ?
April 29, 2013 at 8:03 am
There is no checkbox control in SSRS so I think you might have to rethink that part of it.
Allowing a user to delete records through a report can be a dangerous situation. I would be concerned that the lack of control and oversight to the process might cause some mistakes, and possibly data corruption issues.
That said, yes, you can use SSRS to delete a record, one record at a time, from a table style report. There are a few things I would do in order to get this working.
-First I would build a logging table to put the data that is deleted to allow for some possibility of easy recovery
-Second, on the table based report with all of your records where you want to pick some to delete I would put a report action to a "Delete" report that passes parameters.
-Third the Delete report would be based on a stored procedure that took the appropriate key values (passed via the report action above) from the selected record on the table report, put the record into the log table, deleted it from the source table and then add an output query to the stored procedure to return something to confirm the deletion to the actual report. Something like
SELECT 'The record with a key of ' + @KeyValue + ' has been successfully deleted' AS RecordDeleted
-Fourth I would take the RecordDeleted value from the stored procedure and display it in the Delete report.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply