Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: "formula cant used because evaulated later"error Post Reply Post New Topic
Author Message
oyken
Newbie
Newbie


Joined: 28 Jan 2009
Online Status: Offline
Posts: 7
Quote oyken Replybullet Topic: "formula cant used because evaulated later"error
    Posted: 22 Feb 2009 at 10:26pm
Hello every1 Smile
I am having trouble with duplicates.I tried to make a report with using "next" command on formula field but then getting an error like "this formula
cant be used because it must be evaulated later"... Cry
The report will be like ;
 {field 1}    {field 2}
 AAA            10
 AAA            10
 BBB             5
 CCC            20
 CCC            20
 CCC            20
 
my formula is like " if {field 1}=next({field 1}) then 0 else 1
then i dont want the raport to shows "0" but with selection expert i cant select the formula or i cant use "insert summary" with selecting this
formula.
Also i cant make it with supress because i need sum of {field 2} after i sort out these duplicates.How can i make this ???
Thanks ....


Edited by oyken - 22 Feb 2009 at 10:28pm
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 23 Feb 2009 at 12:43am

Hi

Right Click the formula field in Design View Select Format Field then in Common Tab in Format Editor Click X+2 against Suppress and enter the code
 
 
then getting sum for the field 2
 
Create a formula
 
Frm_Accumulate
WhilePrintingRecords;
NumberVar SumField2;
 
SumField2 := SumField2 + Field2;
 
Frm_FinalSummary
WhilePrintingRecords;
NumberVar SumField2;
 
SumField2 := SumField2 + SumField2
 
Cheers
Rahul
 
IP IP Logged
oyken
Newbie
Newbie


Joined: 28 Jan 2009
Online Status: Offline
Posts: 7
Quote oyken Replybullet Posted: 23 Feb 2009 at 12:49am
will try it when possible ...
lots of thanks for reply :)
IP IP Logged
oyken
Newbie
Newbie


Joined: 28 Jan 2009
Online Status: Offline
Posts: 7
Quote oyken Replybullet Posted: 23 Feb 2009 at 1:21am
unfortunately it didint work or i made something wrong.
First of all supress wont work because even you supress the duplicated values it still count in summary.
So i need to sort out these duplicated values instead of supress.
And another question ...
will i put Frm_Accumulate and Frm_FinalSummary on detail section ?
tbh i didint understand the meaning of Frm_FinalSummary
 
thanks again :)


Edited by oyken - 23 Feb 2009 at 3:53am
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 23 Feb 2009 at 3:56am
Frm_Accumulate
 
Will go in details section you can suppress it as you don't want to show the results of that....
 
and Frm_FinalSummary in report footer
 
Cheers
Rahul
 
IP IP Logged
oyken
Newbie
Newbie


Joined: 28 Jan 2009
Online Status: Offline
Posts: 7
Quote oyken Replybullet Posted: 23 Feb 2009 at 5:54am
here what i have got after tried it
 
field 1 field 2 suppress frm accumulate frm finalsummary
AAA 10   10  
AAA 10 1 20  
BBB 5   25  
CCC 20   45  
CCC 20 1 65  
CCC 20 1 85  
        170
I guess i coulldnt understand u clearly but thanks for your helps :))
the formula works fine
 
whileprintingrecords;
numbervar summary;
if previousisnull({field 1}) then summary:={field 2} else
if {field 1}<>previous({field 1}) then
summary:={field 2} + summary else
summary
 
but the problem is i cant use the formula that has "next" or "previous" commands on record selection.
My problem is to find a way to solve this.If there is a way that u can recommend i will be pleased ...
 
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.