Hi
I've created the following report that takes user inputs and eventually inserts this input into a table. I have the report working fine but I would like to have a dialogue where the user confirms the Save or can Cancel and reload the page.
This is the report that take the user input:
DROP PROCEDURE IF EXISTS sp_DBR_Subbie_Cert_Input
$$
CREATE PROCEDUREsp_DBR_Subbie_Cert_Input
(inPlot_ID varchar(25), inSubbie varchar(25), inCertDate date, inCertDetails varchar(50), inCertGross float )
BEGIN declare Max_Cert_Id int(11);
set Max_Cert_Id=0; select max(y.tblCert_ID) into Max_Cert_ID from
hilmark.tblcertificates_j y
where y.tblCert_XIDJob=inPlot_ID and y.tblCert_XID456=inSubbie group by y.tblCert_XIDJob, y.tblCert_XID456 ; select 'dbr.colstyle',6,'%0.0F';
select 'dbr.colstyle',7,'%0.0F';
select 'dbr.colstyle',8,'%0.0F'; select inPlot_ID as 'Plot[Unit]',
inSubbie as 'Subcontractor[inSub_ID]',
inCertDate as 'Date[inC_Date]',
case
when Max_Cert_Id=0 then 1
else (select a.tblCert_Number from hilmark.tblcertificates_j a where a.tblCert_ID=Max_Cert_ID)+1
end as 'Cert#[inC_No]',
upper(inCertDetails) as 'Details[inC_Det]',
inCertGross as 'Gross[inC_Gross]',
case
when Max_Cert_Id=0 then 0
else (select a.tblCert_Gross from hilmark.tblcertificates_j a where a.tblCert_ID=Max_Cert_ID)
end as 'Prev. Gross[inC_Prev]',
case
when Max_Cert_Id=0 then inCertGross
else inCertGross-(select a.tblCert_Gross from hilmark.tblcertificates_j a where a.tblCert_ID=Max_Cert_ID)
end as 'Change in WIP[inInvNet]';
END
$$
And this is the rpeort that does the insertion:
DROP PROCEDURE IF EXISTS sp_DBR_Insert_New_Sub_Cert
$$
CREATE PROCEDUREsp_DBR_Insert_New_Sub_Cert
(inC_No int(11), inPlot_ID varchar(25), inSub_ID varchar(25), inC_Date date, inC_Det varchar(50), inC_Gross float, inC_Net float, inC_Prev float, inC_WIP float)
BEGIN insert into hilmark.tblCertificates_j ( tblCert_Number, tblCert_XID456, tblCert_XIDJob, tblCert_Date, tblCert_Details, tblCert_Gross,tblCert_NetAmount,tblCert_Previous,tblCert_DateTimeStamp,tblCertificates_AllocateWIP )
values ( inC_No, inSub_ID, Unit, inC_Date, inC_Det, inC_Gross, inC_Gross, inC_Prev, now(),inInvNet); select 'dbr.refresh'; END
$$
I first thought that I could do this with a button but I couldn't figure out how to ask the Yes/NO question and how do I pass the value to that button?
Many thanks again
Jake