Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Use of variables Post Reply Post New Topic
Author Message
w00tNL
Newbie
Newbie


Joined: 28 Feb 2008
Location: Netherlands
Online Status: Offline
Posts: 6
Quote w00tNL Replybullet Topic: Use of variables
     Posted: 07 Mar 2008 at 12:42am
Since nobody is answering my last question I'll have to make a new topic. The problem is I don't know how to properly use variables. This is what I have:
 
In the main report I have a new formula wich contains this:
Shared NumberVar totaal_order := 0;
Shared NumberVar totaal_inkopen := 0;
Shared NumberVar totaal_uren_kost := 0;
Shared NumberVar totaal_uren_bedrag := 0;
Shared NumberVar totaal_addkosten := 0;
Each of these are Sums in a subreport. Now if I go to a subreport, lets's say Order, and I paste the code in the existing formula wich makes:
Shared NumberVar totaal_order := Ceiling (({FOFFVOLG.OVAANTAL} * {FOFFVOLG.OVBEDRAG})-{FOFFVOLG.OVKORTING},0.01);
If I go to the preview window then it gives back the error:
A summary has been specified on a non-recurring field.
Details @bedrag-korting
Now bedrag-korting is the formula name in the subreport Order. Could you help me with this? Because I don't know what I'm doing wrong... Confused


Edited by w00tNL - 07 Mar 2008 at 2:16am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 07 Mar 2008 at 8:59am
Unfortunately, I can't answer b/c I have never seen this error. I wonder if the Ceiling() function has anything to do with it? Since that is a grouping function, where do you have it? If it's in the Details section, then I would move it to the footer so that it is only called once. I would also try removing the Ceiling() function to see if that makes the error go away. I'm not sure what to do instead, but at least you will have pinpointed the error and you will know what needs to be fixed.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
w00tNL
Newbie
Newbie


Joined: 28 Feb 2008
Location: Netherlands
Online Status: Offline
Posts: 6
Quote w00tNL Replybullet Posted: 10 Mar 2008 at 12:39am
I have removed it and it doesn't help, it still shows the error. Also I have my sum in the group footer. Anymore idea's?
IP IP Logged
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