Division by zero error

OK. Thank you so much. I’ll give it a try.

 

Patricia Hall

Systems Analyst

 

T: 256.978.6294

E: phall@...

    www.cbcings.com

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, May 14, 2015 12:01 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Division by zero error

 

 

This worked on a test here...the lines starting with // are just comments

// Crystal formula designer set "Default Values for Nulls"

// If both values are NOT equal to Zero

If ({orderRel.Calc_RelQty} <> 0 and {Part.PartsPerContainer} <> 0)

//Then display the SO RelQty divided by Part PartsPerContainer

then ({orderRel.Calc_RelQty}/{Part.PartsPerContainer})

// Otherwise just display zero

Else 0

Good afternoon all,

 

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

 

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

 

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

 

When I try to run the SO Pick List Report I get the following error:

 

Division by zero.

Details: errorKind

Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:

Error in formula TotesReq:

‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’

Division by zero.

Details: errorKind

 

Any help would be greatly appreciated.

I’m running 905.702A, Crystal Reports, SQL database

 

 

Patricia Hall

Systems Analyst

 

T: 256.978.6294

E: phall@...

    www.cbcings.com

 

 

 

 

 

 

The problem is likely that Part.PartsPerContainer equals zero for one of the parts.
Because you cannot divide by zero, you want to do something like:

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:376ca1.png@58f2cb6a.4eaf94a5]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:24 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Division by zero error


Good afternoon all,

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

When I try to run the SO Pick List Report I get the following error:

Division by zero.
Details: errorKind
Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:
Error in formula TotesReq:
‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’
Division by zero.
Details: errorKind

Any help would be greatly appreciated.
I’m running 905.702A, Crystal Reports, SQL database


Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...>
www.cbcings.com









[Non-text portions of this message have been removed]

First of all thank you for your reply. I desperately needed help. I had high hopes for your suggestion especially since this is urgent and it made a lot of sense. I made the change but unfortunately I still get the same error. Is there something else I’m missing?

 

Patricia Hall

Systems Analyst

 

T: 256.978.6294

E: phall@...

    www.cbcings.com

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 2:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error

 

 

The problem is likely that Part.PartsPerContainer equals zero for one of the parts.
Because you cannot divide by zero, you want to do something like:

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:376ca1.png@58f2cb6a.4eaf94a5]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:24 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Division by zero error


Good afternoon all,

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

When I try to run the SO Pick List Report I get the following error:

Division by zero.
Details: errorKind
Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:
Error in formula TotesReq:
‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’
Division by zero.
Details: errorKind

Any help would be greatly appreciated.
I’m running 905.702A, Crystal Reports, SQL database


Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...>
www.cbcings.com








[Non-text portions of this message have been removed]

Hmm. That really should have taken care of it.
Maybe {Part.PartsPerContainer} is null?

Change the “if” part to:
If (IsNull({Part.PartsPerContainer}) or {Part.PartsPerContainer} = 0)





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:765cd1.png@f22dc3e5.41b9596c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:50 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error


First of all thank you for your reply. I desperately needed help. I had high hopes for your suggestion especially since this is urgent and it made a lot of sense. I made the change but unfortunately I still get the same error. Is there something else I’m missing?

Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...>
www.cbcings.com

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 2:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error



The problem is likely that Part.PartsPerContainer equals zero for one of the parts.
Because you cannot divide by zero, you want to do something like:

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring

[cid:376ca1.png@58f2cb6a.4eaf94a5]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:24 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: [Vantage] Division by zero error


Good afternoon all,

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

When I try to run the SO Pick List Report I get the following error:

Division by zero.
Details: errorKind
Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:
Error in formula TotesReq:
‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’
Division by zero.
Details: errorKind

Any help would be greatly appreciated.
I’m running 905.702A, Crystal Reports, SQL database


Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...<mailto:phall@...%3cmailto:phall@...>>
www.cbcings.com<http://www.cbcings.com>








[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]

Like so?

 

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}

 

When I do this I get: this field is not known.

 

Patricia Hall

Systems Analyst

 

T: 256.978.6294

E: phall@...

    www.cbcings.com

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:06 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error

 

 

Hmm. That really should have taken care of it.
Maybe {Part.PartsPerContainer} is null?

Change the “if” part to:
If (IsNull({Part.PartsPerContainer}) or {Part.PartsPerContainer} = 0)





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:765cd1.png@f22dc3e5.41b9596c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:50 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error


First of all thank you for your reply. I desperately needed help. I had high hopes for your suggestion especially since this is urgent and it made a lot of sense. I made the change but unfortunately I still get the same error. Is there something else I’m missing?

Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...>
www.cbcings.com

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 2:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error



The problem is likely that Part.PartsPerContainer equals zero for one of the parts.
Because you cannot divide by zero, you want to do something like:

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring

[cid:376ca1.png@58f2cb6a.4eaf94a5]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:24 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: [Vantage] Division by zero error


Good afternoon all,

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

When I try to run the SO Pick List Report I get the following error:

Division by zero.
Details: errorKind
Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:
Error in formula TotesReq:
‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’
Division by zero.
Details: errorKind

Any help would be greatly appreciated.
I’m running 905.702A, Crystal Reports, SQL database


Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...<mailto:phall@...%3cmailto:phall@...>>
www.cbcings.com<http://www.cbcings.com>








[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]

Try this way.

If {Part.PartsPerContainer} > 0 Then
    {orderrel.Calc_RelQty}/{Part.PartsPerContainer}
Else
    0


From: "Patricia Hall phall@... [vantage]" <vantage@yahoogroups.com>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Wednesday, May 13, 2015 4:12 PM
Subject: [Vantage] RE: Division by zero error

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 #ygrps-yiv-1209618344yiv1626745358 --

#ygrps-yiv-1209618344yiv1626745358 .ygrps-yiv-1209618344yiv1626745358ygrp-photo-title{
clear:both;font-size:smaller;height:15px;overflow:hidden;text-align:center;width:75px;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358ygrp-photo{
background-position:center;background-repeat:no-repeat;background-color:white;border:1px solid black;height:62px;width:62px;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358photo-title
a,
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358photo-title a:active,
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358photo-title a:hover,
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358attach-table div.ygrps-yiv-1209618344yiv1626745358attach-row {
clear:both;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358attach-table div.ygrps-yiv-1209618344yiv1626745358attach-row div {
float:left;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p {
clear:both;padding:15px 0 3px 0;overflow:hidden;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358ygrp-file {
width:30px;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358attach-table div.ygrps-yiv-1209618344yiv1626745358attach-row div div a {
text-decoration:none;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358attach-table div.ygrps-yiv-1209618344yiv1626745358attach-row div div span {
font-weight:normal;}

#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358ygrp-file-title {
font-weight:bold;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 #ygrps-yiv-1209618344yiv1626745358

filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {panose-1:2 2 6 9 4 2 5 8 3 4;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {panose-1:2 4 5 3 5 4 6 3 2 4;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {panose-1:3 15 7 2 3 3 2 2 2 4;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {panose-1:2 2 6 9 4 2 5 8 3 4;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358
#ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358MsoNormal, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358MsoNormal, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 a:link, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358MsoHyperlink
{color:blue;text-decoration:underline;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 a:visited, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 code
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 pre
{margin:0in;margin-bottom:.0001pt;font-size:10.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 tt
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358cat
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358ct
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358HTMLPreformattedChar
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358attach, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358attach, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358attach
{margin-right:0in;margin-left:0in;font-size:9.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358bold, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358bold, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358bold
{margin-right:0in;margin-left:0in;font-size:10.0pt;font-weight:bold;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358green, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358green, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358green
{margin-right:0in;margin-left:0in;font-size:12.0pt;color:#628C2A;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358replbq, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358replbq, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358replbq
{margin:3.0pt;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358ad, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358ad, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358ad
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358underline, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358underline, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358underline
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358yshortcuts
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358ad1, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358ad1, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358ad1
{margin-right:0in;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358ad2, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358ad2, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358ad2
{margin-right:0in;margin-bottom:7.5pt;margin-left:0in;font-size:12.0pt;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 p.ygrps-yiv-1209618344yiv1626745358underline1, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 li.ygrps-yiv-1209618344yiv1626745358underline1, #ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358underline1
{margin-right:0in;margin-left:0in;font-size:12.0pt;text-decoration:underline;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358yshortcuts1
{font-weight:bold;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358yshortcuts2
{font-weight:normal;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 span.ygrps-yiv-1209618344yiv1626745358EmailStyle36
{color:#1F497D;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 .ygrps-yiv-1209618344yiv1626745358MsoChpDefault
{font-size:10.0pt;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {margin:1.0in 1.0in 1.0in 1.0in;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 div.ygrps-yiv-1209618344yiv1626745358WordSection1
{}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358
filtered #ygrps-yiv-1209618344yiv1626745358 {}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Symbol;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 filtered #ygrps-yiv-1209618344yiv1626745358 {font-family:Wingdings;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 ol
{margin-bottom:0in;}
#ygrps-yiv-1209618344 #ygrps-yiv-1209618344yiv1626745358 ul
{margin-bottom:0in;}
#ygrps-yiv-1209618344



Like so?
 
If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}
 
When I do this I get: this field is not known.
 
Patricia Hall
Systems Analyst
 
T: 256.978.6294
 
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:06 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error
 
 
Hmm. That really should have taken care of it.
Maybe {Part.PartsPerContainer} is null?

Change the “if” part to:
If (IsNull({Part.PartsPerContainer}) or {Part.PartsPerContainer} = 0)





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:765cd1.png@f22dc3e5.41b9596c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:50 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error


First of all thank you for your reply. I desperately needed help. I had high hopes for your suggestion especially since this is urgent and it made a lot of sense. I made the change but unfortunately I still get the same error. Is there something else I’m missing?

Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...>
www.cbcings.com

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 2:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error



The problem is likely that Part.PartsPerContainer equals zero for one of the parts.
Because you cannot divide by zero, you want to do something like:

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring

[cid:376ca1.png@58f2cb6a.4eaf94a5]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:24 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: [Vantage] Division by zero error


Good afternoon all,

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

When I try to run the SO Pick List Report I get the following error:

Division by zero.
Details: errorKind
Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:
Error in formula TotesReq:
‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’
Division by zero.
Details: errorKind

Any help would be greatly appreciated.
I’m running 905.702A, Crystal Reports, SQL database


Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...<mailto:phall@...%3cmailto:phall@...>>
www.cbcings.com<http://www.cbcings.com>








[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]




In the RDD, instead of adding the Part table, select OrderRel from the Report Table -> List, then select the Linked Tables -> Picked Links and move PartNum to Lookup Picked window.  Save the RDD then on Report Table -> Linked Tables -> Description Fields, select PartNum from the drop down and move PartsPerContainer to the Fields Picked window.  This will provide the field directly without having to establish the table relationship you did earlier.  Also delete the calculated field from the RDD.

Once you run the report from Epicor to generate data with the new field, you will need to edit the report in Crystal Reports and update the data source to the report data xml file you generated so the added field will be available in your Crystal Reports formula.

My first thought earlier, since Crystal is involved, was if there is a Left Outer join to Part but no matching Part record in the XML record set I think Crystal treats it as Null.  So a bad part number could also cause it.

-Todd C.

 

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:06 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error

 

 

Hmm. That really should have taken care of it.
Maybe {Part.PartsPerContainer} is null?

Change the “if” part to:
If (IsNull({Part.PartsPerContainer}) or {Part.PartsPerContainer} = 0)





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring

[cid:765cd1.png@f22dc3e5.41b9596c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:50 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error


First of all thank you for your reply. I desperately needed help. I had high hopes for your suggestion especially since this is urgent and it made a lot of sense. I made the change but unfortunately I still get the same error. Is there something else I’m missing?

Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...>
www.cbcings.com

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 2:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] RE: Division by zero error



The problem is likely that Part.PartsPerContainer equals zero for one of the parts.
Because you cannot divide by zero, you want to do something like:

If ({Part.PartsPerContainer} = 0) then
0
Else
{orderrel.Calc_RelQty}/{Part.PartsPerContainer}





Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191

addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring

[cid:376ca1.png@58f2cb6a.4eaf94a5]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 3:24 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: [Vantage] Division by zero error


Good afternoon all,

I’m trying to add a calculated field to the SO Pick List but I’m getting a division by zero error.

I added the Part table to the SOPickList RDD, created a relationship on Company and PartNum. Added a calculated field called TotReq to the Part table in the RDD (not sure I needed this but I added it anyway.)

Added this formula OrderRel.Calc_RelQty / Part.PartsPerContainer inside the SOPickL report in Crystal Reports.

When I try to run the SO Pick List Report I get the following error:

Division by zero.
Details: errorKind
Error in File tmp2 {04091A14-484C-4FD3-81EE-7541431A017E}.rpt:
Error in formula TotesReq:
‘{orderrel.Calc_RelQty}/{Part.PartsPerContainer}’
Division by zero.
Details: errorKind

Any help would be greatly appreciated.
I’m running 905.702A, Crystal Reports, SQL database


Patricia Hall
Systems Analyst

T: 256.978.6294
E: phall@...<mailto:phall@...<mailto:phall@...%3cmailto:phall@...>>
www.cbcings.com<http://www.cbcings.com>








[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]

In Crystal Formula editor...
Have you tried changing "Exception for Nulls" to  "Default Values for Nulls"

Once taht is done a formula something like this might work.....

If (OrderRel.Calc_RelQty <> 0 And Part.PartsPerContainer <> 0)
Then  (OrderRel.Calc_RelQty / Part.PartsPerContainer)
Else OrderRel.Calc_RelQty
'//or some other value if it fails


Have yo seen data for  Part.PartsPerContainer?
Maybe temporarily add the field Part.PartsPerContainer to the report
Or right-click on the field(s) in Crystal field explorer & browse it's data

I changed “Exception for Nulls" to  "Default Values for Nulls" in Crystal and edited my formula to the one below but it fails. Says it’s missing a ).

 

I do get data returned for PartsPerContainer in Crystal.

 

 

Patricia Hall

Systems Analyst

 

T: 256.978.6294

E: phall@...

    www.cbcings.com

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 4:39 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Division by zero error

 

 

In Crystal Formula editor...
Have you tried changing "Exception for Nulls" to  "Default Values for Nulls"

Once taht is done a formula something like this might work.....

If (OrderRel.Calc_RelQty <> 0 And Part.PartsPerContainer <> 0)
Then  (OrderRel.Calc_RelQty / Part.PartsPerContainer)
Else OrderRel.Calc_RelQty
'//or some other value if it fails


Have yo seen data for  Part.PartsPerContainer?
Maybe temporarily add the field Part.PartsPerContainer to the report
Or right-click on the field(s) in Crystal field explorer & browse it's data

>>Says it’s missing a ).
Can you copy me on your full formula,,,
I just typed the example freehand from memory....

Good morning,

 

If (OrderRel.Calc_RelQty <> 0 And Part.PartsPerContainer <> 0)
Then  (OrderRel.Calc_RelQty / Part.PartsPerContainer)
Else OrderRel.Calc_RelQty = 0

 

In the else statement I wasn’t sure what to put there so I set it to 0 which I’m sure is wrong.

 

Patricia Hall

Systems Analyst

 

T: 256.978.6294

E: phall@...

    www.cbcings.com

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 6:21 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Division by zero error

 

 

>>Says it’s missing a ).

Can you copy me on your full formula,,,
I just typed the example freehand from memory....

This worked on a test here...the lines starting with // are just comments

// Crystal formula designer set "Default Values for Nulls"

// If both values are NOT equal to Zero

If ({orderRel.Calc_RelQty} <> 0 and {Part.PartsPerContainer} <> 0)

//Then display the SO RelQty divided by Part PartsPerContainer

then ({orderRel.Calc_RelQty}/{Part.PartsPerContainer})

// Otherwise just display zero

Else 0