Using 3.10..
Someone on a newsgroup was nice enough to guide me through getting Payment Terms on a
report. Now we'd like to figure out how to get "Due Date" on a Sales Invoice.
(in an unrelated note I saw you on there Savatage heh)
Here's what I tried to do so far:
Went in Object Designer and in the Invoice. I've went to View Sections.
I have moved two things to make room for the "Due Date".
I went to View Toolbox and pressed the Add Label button, then I went to Add
Textbox.
Under the Textbox I have changed SourceExpr to "Due Date". Figured I could
just put that in here. The Caption is Due Date:
So, when I try to compile it says "You have specified an unknown variable.
Due Date
Define the variable under 'Global C/AL Symbols'."'
The reason I figured it might be that easy is because I went into Customer
Listing and showed all of a particular customers orders. In there it has Due
Date listed.
0
Comments
An easier way to add fields to sections is by dropping them from the field menu. This will automatically add a label to the textbox, which you can then drag to a header section.
Open the report, and show the sections. Select the section that you want to add the field to, the report designer will know which table to look in. Click View, Field Menu, which opens up the list of fields for that dataitem. Select the field that you need, and then click (drag and drop doesn't work) the section. The cursor will change to a little box with a plus sign. After you click, it will drop the field onto the section, including a label. Move the label to the related header, align your textbox, and you're all set.
RIS Plus, LLC
Okay, here's the thing.. if I go into the report (I am in Report Designer) and goto View Field Menu it shows me a bunch of choices. Due Date is one of them.
When I go to View Sections (I am in Section Designer now) all of those fields disappear.. there is only one. "Number", so I can't just add them like we did previously.
Ok so looking at the section designer, I am assuming you want to add the Due Date to the Header section. You can see that the section itself has a caption that says 'PageLoop, Header'. This means that the section is actually tied to the dataitem that has the name 'PageLoop', which is a dataitem that looks into the virtual table called Integer. Unfortunately, as you've already discovered, you can't select fields from the field menu there, at least not form the table that you want. You will have to specify the table AND the field in the source expression of the control.
So... click your textbox and open the properties. Scroll down to the SourceExpr property. I am not sure if 3.1 had access to the object browser, so I am not sure if you can hit F5 there. Look at other textboxes, and see what they say for table and field names. If you're working on a sales invoice report, which looks into the posted sales invoice table, it should probably say "Sales Invoice Header"."Due Date". If it's a report that looks into the unposted tables, it will be something like "Sales Header"."Due Date".
Make sure you specify the table as well as the field in the control. Then the label simply take a caption value.
By the way, if you tie the label control to the textbox that has your field, it will automatically display the caption of the field itself. You do this by copying the ID of the textbox into the ParentControl property of the label.
Another easy way to do this would be to use the field menu, to add the Number to the section, and then changing the SourceExpr of the textbox to the right table/field.
RIS Plus, LLC
The only problem I have now is nothing to do with you or the instructions. I think it'll involve some whiteout, which isn't a big deal since we don't have many types of these customers.
We have terms setup as Net10 or Net10 Factored for example.. the Due Date Calculation is 10D. Very simple. Your payment is due within 10 days. Net30 is due with in 30 days. Again easy.
We also have terms such as Net10EOM, which means if you had an invoice anytime in February even if it's the 1st or the 28th of the month, your payment is still due on March 10th, correct? I have no clue how to calculate that. But my problem would come in because for example this one company is Net10EOM. She always has the orders ship at the end of the month, so that means she would need to have her payment in before the order is even received possibly.
There's also Net10EOM + 30, which means 10 days after the end of the month + an additional 30 days. Again wouldn't know how to calculate that.
There's not too many EOM customers.. I think maybe under 30 out of 1400+ in our system, so if we're careful we can just whiteout the EOM ones.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC