I have a desktop application to which I'm adding a UX interface. Specifically, a customer can log in, update a couple of fields and then run a report.
The Application is LAN based and is using dbf tables. The report needs to be filtered to yield the correct results. On the desktop, I wrote a script that would set a number of global variables. There are a number of lookups to tables and a number of calculated fields on the report.
Here's some of the xbasic code needed to generate the report.
I have had some success running the report from the web, but most of the calculated fields error out. Is it possible to run an xbasic script from the web? Is it possible to set global variables for reports to use?
What I want is on the left and what I get is on the right.
The Application is LAN based and is using dbf tables. The report needs to be filtered to yield the correct results. On the desktop, I wrote a script that would set a number of global variables. There are a number of lookups to tables and a number of calculated fields on the report.
Here's some of the xbasic code needed to generate the report.
Code:
IF vRptDays = "" THEN vRptDays = convert_type(a5_eval_expression("=alltrim(lookup(\"defaults\",\"Transno =\" + s_quote(vcTransno),\"Days\"))"),"C") END IF IF vRptHours = "" THEN vRptHours = convert_type(a5_eval_expression("=alltrim(lookup(\"defaults\",\"Transno =\" + s_quote(vcTransno),\"Hours\"))"),"C") END IF IF vRptCycles = "" THEN vRptCycles = convert_type(a5_eval_expression("=alltrim(lookup(\"defaults\",\"Transno =\" + s_quote(vcTransno),\"Cycles\"))"),"C") END IF vDays = var->vRptDays vHours = var->vRptHours vCycles = var->vRptCycles vRptDays = vDays vRptHours = vHours vRptCycles = vCycles 'vRptLdgs = vLdgs query1 = "Maint_Work->transno=Var->vcTransno.AND.Maint_Work->Recurring=.T..AND." query2 = ".NOT.isblank('Date_Due').AND.(Date_Due-now()<=val(Var->vRptDays))" query3 = "Hour_Int<>0.AND.(val(Var->vRptHours)+lookup('defaults','Transno ='+s_quote(vcTransno),'AFTT')>=Hours_Due)" query4 = "Cycle_Int<>0.AND.(val(Var->vRptCycles)+lookup('defaults','Transno ='+s_quote(vcTransno),'Lecyc')>=Cycles_Due)" query5 = "Cycle_Int<>0.AND.(val(Var->vRptCycles)+lookup('defaults','Transno ='+s_quote(vcTransno),'Engcyc')>=Cycles_Due)" query6 = "Cycle_Int<>0.AND.(val(Var->vRptCycles)+lookup('defaults','Transno ='+s_quote(vcTransno),'Recyc')>=Cycles_Due)" '' query7 is used for aux hobbs. not included at this time query7 = "auxhobbsInt<>0.AND.val(Var->vRptHours)+AuxHobbscur>=AuxHobbsDue" query.filter = query1+query2+".OR."+query1+query3+".OR."+query1+query4+".OR."+query1+query5+".OR."+query1+query6+".OR."+query1+query7
What I want is on the left and what I get is on the right.
Comment