Solved

Crystal - variable evaluate after with criteria

Posted on 2016-07-25
4
73 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
[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
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 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