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
Solved

Crystal - variable evaluate after with criteria

Posted on 2016-07-25
4
58 Views
Last Modified: 2016-07-26
Attached is a sample report showing one product.  The field is RED shows a evaluate after field taking the previous value - qty on hand.  In this example I need to capture  the value -48.  This is the date where the product first goes negative.  Please let me know how I can capture this value at that point so I can use as shared vairable and pull into main report.sample.rpt
0
Comment
Question by:kelsanit
  • 2
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 41728472
That should capture it.

Why do you think there is a problem?

mlmcc
0
 

Author Comment

by:kelsanit
ID: 41728475
the curret report works perfect, however I now need to capture that value of -48 at the time and not the other values so i can put in the footer and use as shared vairable in the main report.  The report currently sends over the "first negative date" but i now also need the qty that needs to be produced by that date which in this case is -48
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 41728524
Sorry.  JUst need to add a SHARED variable for the first negative quantity.  YOu will need to declare it in the main report just as you did the DATE shared variable.

New formula to use

EvaluateAfter({@zDisp_Qty_OnHand});
SHARED NumberVar Qty_OnHand;
SHARED DateVar First_Negative_Date;
SHARED NumberVar First_Negative_Qty;

Qty_OnHand := Qty_OnHand - {ORDER_TRL.Quantity-Open};
If Qty_OnHand < 0 AND First_Negative_Date = Date(1900,1,1) then
(
    First_Negative_Date := {ORDER_HDR.Ship-Date};
    First_Negative_Qty := Qty_OnHand;
);
Qty_OnHand

Open in new window


mlmcc
0
 

Author Closing Comment

by:kelsanit
ID: 41729479
Thank you
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

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. …
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…

840 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