web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

how to sum the column without using calcsum in business central

Posted on by 208
Sum the Employee PF Withdraw column and after that subtract with total pf and stored in total provident fund but it doesnot work for more than two rows.
 
 qrytbl.Reset();
                qrytbl.SetRange(/CNIC NO../, rec.CNIC);
                pftbl.Reset();
                pftbl.SetRange(CNIC, rec.CNIC);
                if qrytbl.FindSet() then begin
                    if pftbl.FindSet() then begin
                        pftbl.SetFilter(CNIC, rec.CNIC);
                        if pftbl.Find('-') then begin
                            repeat
                                myint := pftbl./ Employee PF Withdraw / + / Employee PF Withdraw /;
                            // / Employee PF Withdraw / := Rec./ Employee PF Withdraw / + xRec./ Employee PF Withdraw /;
                            // myint := / Employee PF Withdraw /;
                            // pftbl.CalcFields(/ Employee PF Withdraw /);
                            // pftbl./ Employee PF Withdraw / += pftbl./ Employee PF Withdraw /; //+ rec./ Employee PF Withdraw /;
                            until pftbl.Next() > 0;
                        end;
                        // pftbl.CalcSums(/ Employee PF Withdraw /);
                        pftbl.CalcSums(/ Total PF /);
                        qrytbl.TotalProvidentFund := pftbl./ Total PF / - myInt;//((pftbl./ Employee PF Withdraw / - xRec./ Employee PF Withdraw /) +)
                        // qrytbl.Modify(true);
                        qrytbl.Modify();
                    end;
                    // end;

                end;

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans