Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Deleting record from SSRS report


Deleting record from SSRS report

Author
Message
syedathariqbal
syedathariqbal
SSC-Enthusiastic
SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)SSC-Enthusiastic (145 reputation)

Group: General Forum Members
Points: 145 Visits: 605
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 ?
Daniel Bowlin
Daniel Bowlin
SSCrazy
SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)SSCrazy (3K reputation)

Group: General Forum Members
Points: 2952 Visits: 2629
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search