?
Solved

Can i store a formula value in crystal reports

Posted on 2011-09-20
8
Medium Priority
?
246 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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses
Course of the Month8 days, 2 hours left to enroll

765 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