Urgent help

xiaoxiao2021-03-06  72

I am a newbie. Now I have encountered a hands-out question, ask you to help

I want to use Cell (Chinese Table 5.0) in a page to calculate multiple formulas, the calculation of the formula is calculated in the cruise database, and the method in C / S is like this:

Calcfunc (is a self income of Cell)

Begin

Call another program return result

P1 = ...

P2 = ...

Ret = CALC (P1, P2)

SetFuncResult NVAR, SVAR, NTYPE

end

The program will repeat CalcFunc

How to implement it in the Web

I am a list.jsp (fp2) as follows:

....

Sub loadingformula

Cell.Setformula (1, 2, 0, "CALC ('102', 1)") 'will call Cell_CalcFunc for calculation

Cell.Setformula (2, 2, 0, "CALC ('101', 1)") 'will call Cell_CalcFunc to calculate

End Sub

Sub cell_calcfunc (Byval Name, Byval Rettype, ByVal Paranum)

DIM SVAR, NVAR, LP

svar = ""

NVAR = 0

LP = 0

IF ucase (name) = "Calc" then

BM = Cell.GetfuncStringpara (0, LP)

Sfunc = CINT (JTPCell.Getfuncdoublepara (1, LP))

FP2.Action = "bb_hide_calc.jsp? FuncName =" & Name & "& BM =" & BM & "& Sfunc =" & Sfunc

fp2.submit

END IF

End Sub

Sub SetValue (NVAR, SVAR, NTYPE)

Cell.SetfuncResult NVAR, SVAR, NTYPE

End Sub

.....

BB_HIDE_CALC.JSP internal space is as follows:

<%

String funcname = Request.getParameter ("FuncName");

String BM = Request.GetParameter ("BM");

String sfunc = request.getParameter ("sfunc");

INT nfunc = new integer (sfunc) .intValue ();

COM.BBGL.BBTJBEAN BB = New com.bbgl.bbtjbean ();

String svar = "";

Double nvar = 0;

NVAR = bb.getcalc (KMBM, NFUNC, ZTBH, RQ);

%>

Function window_onload ()

{

Parent.listframe.SetValue (<% = nvar%>, "<% = svar%>", 0)

}

....

When only one is executed, it can be implemented correctly.

But when you want to perform multiple calculations, you can only take a certain result value.

I analyzed that when I was called BB_HIDE_CALC.JSP, I was submitted to the background, and I didn't wait for him to perform the next call.

How do I solve this problem?

转载请注明原文地址:https://www.9cbs.com/read-109558.html

New Post(0)