Thursday, June 27, 2013

Crystal Reports : Zero Divide Errors

When division occurs within calculated fields, there is always the risk of getting the dreaded "zero divide error". This happens, obviously, when a calculation tries to divide the number zero.

And since we all know that underlying data cannot be trusted 100%, it is necessary to test for these zero divide errors within our Formula Field.

Example: The formula field called {frmSalesPerDay} is a simple division of {NumSales} by {NumDays}.

So our {frmSalesPerDay} code should look like this:

if {NumSales} = 0 then 0 else {NumSales} / {NumDays}

So, if {NumSales} equals zero, then we simply return a zero and exit the formula. Otherwise, we let it perform the division.

This is important any zero divide error will halt the report completely!

1 comment:

Anonymous said...

Even while ordering stylish house furniture you ought to look at level of comfort, and model and even funding to a provided with replica chanel thing. Yet another thing you must always remember is definitely the model idea. Business normal idea designed for great room house furniture, bedroom house furniture, and even kid’s living room house furniture will furnish distinct appearance and feeling to your residence. A few web based house furniture sites provide you with captivating opportunities at gucci outlet stylish house furniture brandnames. It is easy to look into ordering confidential stylish house furniture as a result of truth be told there. It is an inexpensive replacement for one's whole family home furnishing must have. To end up some of the top notch HOME BUSINESS suppliers, next you should really have your home business web based. Cyberspace is known as a tremendous niche. A myriad of people use the application for up to each individual actions in recent times. Then when one advertise ones own programs web based, fake rolex watches of folks are aware of one, what you are promoting and the programs. A wonderful to help you confine you to ultimately any nearby advertise. It is easy to travel world-wide. Ones own clientele increase as you advertise your own self via the websites as a result of accelerated website traffic coming to your website. Designed for finding cyberspace, personal computer is known as a home pc together with a broadband internet connection. The get the job done to get achieved may be done belonging to the level of comfort of your residence. Have to to go get the job done for the period of go replica watches uk. You might use media online sites enjoy Facebook . com and even Orkut to trade items absolutely free. Search engine marketing is known as a very economical option which sometimes travel far away on assuring achieving success ─▒nside your Multilevel marketing business. Everybody will be good on network marketing business in cases where brand-new areas such as romance, resolve additionally, the enthusiasm to help you fake rolex submariner watches. The ideal HOME BUSINESS is having to do with retailing conisderations to really similar best freinds and family. Though experts agree it is manufactured by using the concept in improve.