Thanks for that.
Sorry for taking up your time but this is where I've got to.
I have the following report called from the 'create new' button:
select 'dbr.javascript', 'function mycallback()
{
// Value of A in edited row
var A = col_value_get( this, 6 );
// Value of B in edited cell
var B = col_value_get( this, 7 );
// Set the value of 8th 6+7 column
col_value_set( this, 8, 0, A+B);
}';
select 'dbr.report', 'sp_DBR_Insert_Mat_Inv','[Save]','inSuppID=SuppID','inPlot_ID=PlotID','inInvDate=InvDate','inInvRef=InvRef','inInvDet=InvDet','inInvNet=InvDet','inInvVAT=InvVAT','inType=MatType';;
select 'dbr.calc', 'Gross', '[InvNet]+[InvVAT]';
select 'dbr.editable', '[SuppID]','sp_DBR_dummy_edit_input','type=select','select=select hilmark.tblsuppliers_j.tblSupplier_Ref, hilmark.tblsuppliers_j.tblSupplier_Name FROM hilmark.tblsuppliers_j where hilmark.tblsuppliers_j.tblSupplier_isSubbie = 0 order by hilmark.tblsuppliers_j.tblSupplier_Name';
select 'dbr.editable', '[PlotID]','sp_DBR_dummy_edit_input','type=select','select=select tblsitesplotsjake.tblContractXidJobNo,tblsitesplotsjake.tblContractXidJobNo FROM hilmark.tblsitesplotsjake';
select 'dbr.editable', '[InvDate]','sp_DBR_dummy_edit_input','type=datepicker';
select 'dbr.editable', '[InvRef]','sp_DBR_dummy_edit_input','type=textarea';
select 'dbr.editable', '[InvDet]','sp_DBR_dummy_edit_input','type=textarea';
select 'dbr.editable', '[InvNet]','sp_DBR_dummy_edit_input',"options={'callback':mycallback}";
select 'dbr.editable', '[InvVAT]','sp_DBR_dummy_edit_input',"options={'callback':mycallback}";
select 'dbr.editable', '[MatType]','sp_DBR_dummy_edit_input','type=select','select=select tblcostcodes_j.tblCostCode_Id,tblcostcodes_j.tblCostCode_Ref from hilmark.tblcostcodes_j order by tblcostcodes_j.tblCostCode_Ref';
select 'dbr.colstyle', 1, '[width:200px]';
select 'dbr.colstyle', 2, '[width:150px]';
select 'dbr.colstyle', 3, '[width:100px]';
select 'dbr.colstyle', 5, '[width:200px]';
select 'dbr.colstyle', 6, '[width:100px]%.2f';
select 'dbr.colstyle', 7, '[width:100px]%.2f';
select 'dbr.colstyle', 8, '[width:100px]%.2f';
SELECT
null as 'Supplier Ref[SuppID]',
null as 'Plot[PlotID]',
curdate() as 'Inv Date[InvDate]',
null as 'Inv Ref[InvRef]',
null as 'Details[InvDet]',
0 as 'Net[InvNet]',
0 as 'VAT[InvVAT]',
0 as 'Gross[Gross]',
null as 'Type[MatType]',
'Save' as 'Save[Save]';
The 'sp_DBR_dummy_edit_input' report called when editing the fields above is:
DROP PROCEDURE IF EXISTS sp_DBR_Dummy_Edit_Input
$$
CREATE PROCEDURE sp_DBR_Dummy_Edit_Input
()
BEGIN
END
$$
On the face of it this works great in that I can change/enter the fields as designed. However when I click 'Save' to call the Insert Report I hit a problem.
The 'sp_DBR_Insert_Mat_Inv' report has the following temporary code which at present should just display the passed parameters.
DROP PROCEDURE IF EXISTS sp_DBR_Insert_Mat_Inv
$$
CREATE PROCEDURE sp_DBR_Insert_Mat_Inv
(inSuppID varchar(25),inPlot_ID varchar(25),inInvDate date,inInvRef varchar(25),inInvDet varchar(50),inInvNet DOUBLE,inInvVAT DOUBLE,inType int(3))
BEGIN
select 'dbr.pageview';
select
inSuppID as SuppRef,
inPlot_ID as Plot,
inInvDate as invDate,
inInvRef as Ref,
inInvDet as Detail,
inInvNet as Net,
inInvVAT as VAT,
inType as Type,
now() as EnterWhen;
END
$$
Nothing gets displayed other than the report's Title, Parameter User Input Column and a Run Report button. Not what I was expecting.
I've noticed that the parameters are not being sent in the URL other than the date which is set by default - /mydbr/report.php?r=60&p1=&p2=&p3=25%2F08%2F2014&p4=&p5=&p6=&p7=0.00&p8=&m=4&h=43c6351c29f133a2d423285f9cf43d4a034aea9b&i=1
Any reason why this is not working?
Cheers and thanks again
Jake