Solved

Crystal  - Shared vairable capture wile printing

Posted on 2016-08-09
1
56 Views
Last Modified: 2016-08-09
Attached is a sample report where I am trying to capture the TOTAL netagive value for that ship date.  Curretnly the formuals are written to capture the First Negative date which is working but in the event there are multiple orders on the same day it does not work as desired.

Example:
Product: 323600-69
Total negative amount:  164   (this is the value I want to capture as that is the sum of the total negative amount for the 8/9/2016 ship date.  Currently the vairable is only capturing the -32 value since that is the first negative amount.
Sample1.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
1 Comment
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 41748866
Try changing your calculation formula zCalc_Qty_OnHand_AfterOrder to

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*-1;
)
Else If Qty_OnHand < 0 AND First_Negative_Date = {ORDER_HDR.Ship-Date} then
    First_Negative_Qty := Qty_OnHand*-1;

Qty_OnHand

Open in new window


mlmcc
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

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…
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 …
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

628 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