In Nav 4.0 when you press F9 on the Customer Card you get the Customer Statistics form. From there you can drill down on the Balance (LCY). One of my Customers wants to see only the Open Customer Ledger Enties that make up the Balance and not all entries. I suggested they then set a filter on the Open field but they do not want to do this, they want it to be automatic. Can anyone tell me how I can code the drilldown to filter on Open entries only.
If you want to see the open entries only, you have to set a filter on that field, there is no other way around this. The Balance (LCY) is a flowfield into the ledger table. You could change the flowfield definition in the Customer table, but that would probably have all sorts of side effects. Maybe you should add a new flowfield called ‘Open Balance (LCY)’ to the Customer table, and add a filter on the Open field.
Drilling into ALL the entries is fine in the beginning but once the ledger entries grow 50->100->200-> etc. It’s a real pain to look at. That’s what we did Daniel. Work’s like a charm Create a new flowfield (same as Balance but filter on “OPEN” only).
Actually, you don’t need a new field. Don’t forget that with the Detailed Ledger system, the FlowFields in the Customer table are based on the Detailed Cust. Ledger Entry table but the drilldown is provided at form level. Therefore, you only need a new control also with SourceExpr Balance but using a different logic on the DrillDown trigger.
The extra field was provided to give a choice between “open” & “all” entries with the click of the button. Some users needed just open while others needed all. either way - it’s pretty easy to do.
This is a bit picky, but what I meant really is that on the Table there will still be only one field (Balance). On the Form there will be 2 controls, one for the standard Balance and another one for the “Open” Balance. The difference between them being the code which is run when you DrillDown.  From your reply, I wasn’t sure if my point got across, so I gave it another go.
Thanks to you all for replying. I’m new to programming and cant quite grasp what you all mean. I understand what you are saying about creating another field on the Customer table which I did but when adding table filters to this field I come unstuck. Firstly, the table filter is looking at the Detailed Cust. Ledg. Entry table which does not have an Open field and secondly, the result shows me the Cust. Ledger Entry table. Please could someone explain in idiot language what I have to do as try as I might, I cannot see how the results are returned to the Cust Ledger Entry table when you are drilling down from te Customer Card to the Detailed Cust. Ledge. Entry table.
Hi Guys, scratch that last entry by me. I figured out how the Customer Ledger Entry Form appeared and I have done the following which works and I havent found any knockon effects from doing it UNLESS anyone knows better. I edited the Customer Ledger Entry table and added the folowing line to Function DrillDownOnEntries CustLedgEntry.SETRANGE(Open,TRUE); // added before the follow line Form.RUN(0,CustLedgEntry); Does any of you know if there should be any problems with this as I said, I’m new to programming in C/Side, give me an IBM 3090 Mainframe and COBOL II and I’ll make it sing.
I would just slightly change the approach. In Cust. Ledger Entry table, I would copy the function you changed - DrillDownOnEntries - to a new function: DrillDownOnOpenEntries. In this function, I would include the line of code you mention: CustLedgEntry.SETRANGE(Open,TRUE); Then, on the Customer card, I would again copy the Balance (LCY) textbox and paste it as a new control, say “Balance (LCY) - Open Entries”. By pressing F9 while this new control is selected, I would just need to change the function which gets called at the end of the OnDrillDown trigger - replacing CustLedgEntry.DrillDownOnEntries(DtldCustLedgEntry); by CustLedgEntry.DrillDownOnOpenEntries(DtldCustLedgEntry); This would leave the existing standard stuff intact while giving your customer what they need.
Hi Nelson, very good point and I thank you. I will do that now because as you rightly said, it will preserve the original code. Thanks very much for your help.
would leave the existing where it is in the OnDrill down, and add the new one the the Assist edit code, that way you don’t touch existing code, and users can easily use ctrl+f2. or the mouse. Its how I do it anyway [:D]
That’s Shift+F2, not Ctrl+F2. And it’s also a good idea for having one less control on the form.
That’s Shift+F2, not Ctrl+F2.
Originally posted by nelson - 2005 Nov 03 : 13:34:24
[Oops!] [B)] I’m never gonna live that one down am I [?]
None of us design-freaks are ever gonna leave it alone…
I’ll see if I can get MS to change it in the next version of Navsion so that I am right again.