Report-Cust name

idontknowidontknow Member Posts: 66
I have created a report with "Sales credit memo line" table.I need to print customer name on it.So i have written the code this way on OnAfterGetRecor().But the code is not working.What's wrong with this code?
IF Cust.GET(CreditmemoLine."Sell-to Customer No.") THEN BEGIN
   CustName:=Cust.Name;
   END;

Answers

  • SavatageSavatage Member Posts: 7,142
    try just using
    ("Sell-to Customer No.")
    instead of
    (CreditmemoLine."Sell-to Customer No.")
  • idontknowidontknow Member Posts: 66
    Savatage wrote:
    try just using
    ("Sell-to Customer No.")
    instead of
    (CreditmemoLine."Sell-to Customer No.")

    Thank you very much....But can you just tell me what is the real difference between both?
  • ssinglassingla Member Posts: 2,973
    On After Get Record means you have defined "Sales credit memo line" as data item and your code says
    "CreditmemoLine"

    Either directly use the field (which is good) or "Sales credit memo line".field.
    "CreditmemoLine" seems to be a variable and it might not have been intialized.
    CA Sandeep Singla
    http://ssdynamics.co.in
Sign In or Register to comment.