Hi
Going round the bend with this.
I've been able to do this before but I can't get it to work now.
I've a simple crosstab report in which I've set up editing of a value an I wish to get the hsum to update on change.
This is where I've gotten to:
select 'dbr.javascript', 'function mycallback()
{
// Calculate sum of edited column autosum_int(this);
ct_total( $(this).parent().children()[3] );
}';
select 'dbr.title',concat("Sales Data Input Module for ",(select CustName from customer where `Customer Code` = inCustID)," for ",inYear);
select 'dbr.embed_object','createx';
select 'dbr.report', 'sp_DBR_Bud_Add_Existing','createx','inCust=1','inYr=2'; select 'dbr.button', 'Add Existing Product'; select vCust,vYear;
select 'dbr.crosstab','Mon'; select 'dbr.crosstab.col','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'; select 'dbr.hsum', 'Qty'; select 'dbr.hidecolumns','Cust'; select 'dbr.colstyle','Qty','%0.0f;-;';
select 'dbr.editable', 'Qty', 'sp_DBR_Budget_Qty', 'inCust=Cust','inProd=PCode', 'inYr=Year','inMon=Mon',"options={'onblur':'','callback':mycallback}";
select c.`Item Code` as "Product Code[PCode]", c.`Item Description` as "Product[Prod]", date_format(a.budDate,"%b") as "Month[Mon]", ifnull(a.budQty,0) as "Qty[Qty]", inCustID as "[Cust]", inYear as "[Year]" from tblbudgets a join `item master` c on a.budProdID = c.`Item Code` where a.budCustID = inCustID and year(a.budDate) = inYear;
I'm obviously not understanding this at all.
Cheers
Jake