Skip to main content

Notifications

Business Central forum
Suggested answer

Not all lines are not printed on ProForma report

Posted on by 6
Hi all,
 
Cant figure out how to print lines with type other than Item on ProFormaInvoice report.
 
Any ideas?
 
Best regards
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 60,926 Super User on at
    Not all lines are not printed on ProForma report
    Hi, I just made a detailed explanation and hope it gives you some tips.
    Dynamics 365 Business Central: How to print all type of lines in standard Pro Forma Invoice report – Customization
     
     
    Thanks.
    ZHU
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 60,926 Super User on at
    Not all lines are not printed on ProForma report
    Hi, you can try the following.
     
     
    Thanks.
    ZHU
  • Not all lines are not printed on ProForma report
    gdrenteria, as i see the data for the lines is collected from the Item table in this procedure
     
    local procedure GetItemForRec(ItemNo: Code[20])
        var
            IsHandled: Boolean;
        begin
            IsHandled := false;
            OnBeforeGetItemForRec(ItemNo, IsHandled);
            if IsHandled then
                exit;
     
            Item.Get(ItemNo);
        end;
     
    And as far as i know we cant replace this logic with purely custom one. Or am i wrong?
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 60,926 Super User on at
    Not all lines are not printed on ProForma report
    This is standard behavior. If you need to print something other than Item, you need to customize it using the event mentioned by gdrenteria.
     
    Thanks.
    ZHU
  • gdrenteria Profile Picture
    gdrenteria 3,137 Super User on at
    Not all lines are not printed on ProForma report
    Hi
    Is this the report? Well, it makes a filter for only the product lines, you could try and subscribe to the event mentioned there, but I'm not sure what could appear in the report after a filter change.
     
    report 1302 "Standard Sales - Pro Forma Inv"
     
     trigger OnPreDataItem()
                    begin
                        TotalWeight := 0;
                        TotalAmount := 0;
                        TotalVATAmount := 0;
                        TotalAmountInclVAT := 0;
                        SetRange(Type, Type::Item);
                        OnAfterLineOnPreDataItem(Header, Line);
                    end;
    BR
    GR

Helpful resources

Quick Links

Upcoming TechTalk: Copilot Capabilities…

Review the Copilot features that are currently available in Dynamics 365 Finance…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,405 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,370 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans