Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Can i store a formula value in crystal reports

Posted on 2011-09-20
8
Medium Priority
?
255 Views
Last Modified: 2012-05-12
I have the result of formula in a group footer.  Can I take that result and store that value then go back up to the details and reevaluate the number?  When I try it now it just reevaluates the formula for every line when I want it to just use the value from the first result.
0
Comment
Question by:WTIAutomation
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Assisted Solution

by:musalman
musalman earned 164 total points
ID: 36570082
Yes it will behave like this.
It is better if u calculate the footer value in sql and then use that value in detail
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 36570148
What is the formula in the footer?

If the formula is the right kind it may be possible to do what you want or you could insert a subreport in the group header to get the value then use it in the detail section

mlmcc
0
 

Author Comment

by:WTIAutomation
ID: 36570218
Mimcc,
Its a formula you wrote for for the report we we're working on the last several weeks.  Its the mean in that report.  When I run the mean, i need to the take that value of mean in the group footer store that value and the reevaluate the lines in the details section using that value in another formula.    

Reference:
http://www.experts-exchange.com/Database/Reporting_/Crystal_Reports/Q_27285200.html

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:WTIAutomation
ID: 36570317
Just to give you the latest idea of whats going on, here is a fresh version of the report with data.  What I'm trying to do is compare the {recommenedStockQTY} field against the {TrxQTY} of every line and then mark it with a 1 or 0.  Count the 1s and then divide that by the total number of transactions.  What this will do is give me a percent of coverage, allowing me to judge then restocking quantities.  

 Inventory-for-Stock-production-r.rpt
0
 
LVL 35

Accepted Solution

by:
James0628 earned 172 total points
ID: 36586052
I haven't tried to analyze it fully, but I don't think you can do what you want in that report.  recommendedQTYStock uses a formula that uses a formula that uses variables, which are set in a formula that uses {NVTTRX.TRX_DATE} - next({NVTTRX.TRX_DATE}).  Because of that, I don't think you can use one of CR's built-in summary functions, and the variables won't have the final values for the group until the report has read the last record for the group, meaning that you won't be able to see the final value for the group when reading the detail records.

 The obvious answer would be to use a subreport in the group header to get the value for recommendedQTYStock for each group.  Then you could check that in the details.  Another option might be to create a manual query that calculated recommendedQTYStock, so that it was included in the data that the report read (so CR wouldn't have to calculate it).

 Since mlmcc worked with you on the previous question, maybe he'll will have some other insights.

 James
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 164 total points
ID: 37014204
I just looked at in some detail.  I agree with James.  You could use a subreport to calculate the recommendedQTYStock value and pass it back in a shared variable.

Other than that idea, I don't think it is possible to use the value.

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 37181718
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question