Report Qty/Current Qty Customization

I am performing a calculation from another field to populate the current quantity in Report Qty but having a bit of an issue keeping that value. After I click OK and go back in or go to end activity the amount does not show back up for prior or completed.

I can make it work by using code to focus on the field then sending a TAB, but not by using the dataview. I guess it works for now, but just curious what is going on after I manually leave the field. Nothing shows up in the trace log.

It’s going to be tough to diagnose anything without seeing your code.

I’m with Aaron but I’ve got a hunch it has to do with Notify()

Here is the small portion of code related to the current qty.

Dim RQ As EpiDataView = Ctype(oTrans.EpiDataViews(“RQ”),EpiDataView)
Dim Footage As Decimal = CalcFtFromOrderDtl
RQ.dataView(RQ.Row)(“CurrentQty”) = Format(Footage,"####.####")

Hard to say from such a small snippet, but it looks like you’re setting the dataview CurrentQty. The problem is after the “leave” event of the field you tab off of, which probably triggers a refresh of that dataview.

Try this:

RQ.dataView(RQ.Row).BeginEdit();
Your changes here
RQ.dataView(RQ.Row).EndEdit();
oTrans.NotifyAll(); or oTrans.NotifyAll(true); (Depends on the form)
oTrans.Refresh();

The Begin and End edit with Otrans.NotifyAll(True) does the trick.

Just Otrans.NotifyAll did not.

oTrans.Refresh() errors as not a member of RQTransaction

1 Like