Solved

Can i store a formula value in crystal reports

Posted on 2011-09-20
8
238 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 41 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: 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.

 

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 43 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 41 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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