Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Selection Formula - Checking sum of fields Post Reply Post New Topic
Author Message
Victoryy
Newbie
Newbie
Avatar

Joined: 13 Dec 2010
Online Status: Offline
Posts: 6
Quote Victoryy Replybullet Topic: Selection Formula - Checking sum of fields
    Posted: 15 Dec 2010 at 5:21pm
Hi All,
I have a crystal report with DrAmt, CrAmt, DrBankAmt, CrBankAmt fields.
While displaying the report i want to display.. the records whose following condition satisfied...

 ((sum(DrAmt)+sum(CrAmt)) - (sum(DrBankAmt)+sum(CrBankAmt))) <> 0

how can i check for this condition in selection formula....

I have used following line of code... but its not working showing error
"Functions can not be used in selection formula"

CrptReport.SelectionFormula = "(Sum ({accounts.DrAmt})+ Sum ({accounts.CrAmt}))-(Sum ({accounts.DrBankAmt})+Sum ({accounts.CrBankAmt}))<> 0 ";
               
Thanks in advance,
Regards,
Victoryy
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.