Solved

Crystal Reports Shared CurrencyVar breaks formula when passing negative number

Posted on 2014-01-24
6
831 Views
Last Modified: 2014-02-02
I have multiple subreports passing shared numbervar and currencyvar...
The Billing Rate subreport's @Rate formula is the following:
if {@hours}>0
then ({Orders.OrderTotal}-({@materials}+{@misccost}))/{@hours}
else 100


@materials is a shared currencyvar
@misccost is a shared currencyvar
@hours is a shared numbervar

The subreport and formula work fine until @misccost is a negative number (from debit memo)...

Is there a method of formatting the @misccost shared currencyvar so that the negative will allow the @Rate value to be displayed? Or is something else breaking the formula?

See attached for reference.
Subreport.pdf
0
Comment
Question by:Lee Ingalls
[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
  • 3
  • 3
6 Comments
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 39807790
The negative value is not (at least I don't think it is) breaking the formula.

Is the Order Amount NULL?

Try setting the Exceptions For NULL option to DEFAULT FOR NULL

mlmcc
0
 
LVL 8

Author Comment

by:Lee Ingalls
ID: 39815383
Thanks mlmcc,

I set the "Exceptions For NULL option to DEFAULT FOR NULL" for the main and subreports; though it did not necessarily fixed the problem it did display 0.00 rather than nothing. That gave me an indication where to look. At that point I started breaking down each formula to see where they were failing.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39815453
Are you able to fix the issues?

mlmcc
0
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.

 
LVL 8

Accepted Solution

by:
Lee Ingalls earned 0 total points
ID: 39815872
What ultimately fixed the report was rewriting the Main Report @Material Costs formula to include NULL handling.

@Material Costs
from:
Sum ({@Misc Costs})+({@poval})

to:
IF ISNULL ({@Misc Costs})
THEN {@POVal}
ELSE IF ISNULL ({@POVal})
THEN ({@Misc Costs})
ELSE ({@Misc Costs})+{@POVal}

Whenever @Misc Costs was 0.00 my Main Report formulas:
@Material Costs
@Total Costs
@Gross Profit
@Billing Rate
all displayed NULL. Once I handled the NULL's each dependent value was passed to the subsequent formula.

I wouldn't have been able to see this until your suggestion to check the Report Options "Exceptions For NULL option to DEFAULT FOR NULL". How do you suggest I award the solutions points?

Regards, BudELee
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39816149
ANy way you desire.  Since my suggestion helped you can select it as assisted solution with your comment as the solution.  I believe you can award partial points if you desire.

mlmcc
0
 
LVL 8

Author Closing Comment

by:Lee Ingalls
ID: 39827473
mlmcc's suggestion, though not solving the problem directly lead to my being able to solve it.
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
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 …
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

719 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