Hi
I have created a report with following SP's to delete the specific Row's in MS SQL Database. but not able to execute the report
and delete the rows. Please check the below SP's and help me to fix this issues.
if object_id('Patient_Data_Delete','P') is not null
drop procedure Patient_Data_Delete
go
create procedure Patient_Data_Delete
(
@lab_id varchar(10)
)
AS
BEGIN
select 'dbr.report', 'Patient_Data_Delete1', '[del]', 'hiddendiv', 'lab_id=lab_id', 'event=click', 'callbefore=confirmdel';
select
a.lab_id as 'lab_id',
BRANCH_CODE as 'BRANCH_CODE',
b.TEST_GROUP_CODE AS 'test_group_code',
b.Report_file as 'Report_file',
'dbr.purehtml:<div class="i_delete"></div>' as '[del]'
from patient_dtl a
inner join patient_test_group_list b on a.lab_id = b.lab_id
where a.lab_id = @lab_id
select 'dbr.embed_object', 'hiddendiv';
end
go
--------------------------------------------------------------------------------
if object_id('Patient_Data_Delete1','P') is not null
drop procedure Patient_Data_Delete1
go
CREATE PROCEDURE Patient_Data_Delete1(
@lab_id varchar(8),
@test_group_code varchar(25))
as
BEGIN
delete from patient_test_group_list where lab_id = @lab_id and test_group_code = @test_group_code
select 'dbr.javascript', '$(mydbr_selected_cell).parent().remove();';
END
go
--------------------------------------------------------------------------------------------------------