Print Page | Close Window

formula evaluation

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5756
Printed Date: 28 Apr 2024 at 9:39pm


Topic: formula evaluation
Posted By: cajsoft
Subject: formula evaluation
Date Posted: 12 Mar 2009 at 5:32am
Hi Folks,
I have a crystal report that needs a summary page on the page header to include summaries of all the formula's in the detail section.
 
I've created a var on the detail section to total FIELD A.  I have then created formulas to total the field etc.  I wish to place this field on the report header but when I do so the value is 0.  I understand this is because the formula I placed in the detail section to total the var is not executed until after the page header is displayed.. does anyone know any way round this?
 
thanks
Craig.



Replies:
Posted By: lockwelle
Date Posted: 12 Mar 2009 at 6:19am
I always think of Crystal as basically reading the data, one line at a time, so it doesn't know about the output of a formula in the detail section in the header section...I could be wrong, but this is how I think of it.
 
To get summary info in the header, I usually have to create a formula that is an aggregate (get the sum of a field for a group) or if it is more complex, a subreport to report back the values.
 
Hopefully, someone else has an answer that gets the summary in the header.


Posted By: DBlank
Date Posted: 12 Mar 2009 at 7:03am

Try and use the Summary Function to get your value. These can be placed in headers and can even use formulas as long as they are not using variables. (They are by default inserted into the selected footer but can be moved up to a header).

I see you have used a var but is it needed or just what you used? Can it be replaced with a formula field which you can then use the Summary Functiona as a SUM on?



Print Page | Close Window