Wednesday, February 27, 2013

Crystal Reports : Bucketing Problems

Double bucketing; it is a scourge upon the hapless Crystal Reporter!

Another technique to use when bucketing is to force Crystal to use mutually exclusive "automagical" functions. A good example of this is to use the YEAR() function to group any date by it's corresponding year.

So, if we break out INVOICES.DATE by grouping by YEAR(INVOICES.DATE), we can be assured that any one invoice can only belong to one specific year. Therefore we avoid double bucketing.

But the needs of the client are paramount; some businesses like "strange logic" to be applied to their buckets, depending on usage requirements.

An example: a client needs all invoices cut in December 2009 to belong to year 2010, yet anything previous should belong to year 2009.

So:

2010 Bucket:
YEAR(INVOICES.DATE) = 2010 OR (YEAR(INVOICES.DATE) = 2009 AND MONTH(INVOICES.DATE) = 12)

This code above includes all invoices with a year of 2010 AND also the ones from December 2009.

So we can see that sometimes the "automagical" crystal date function do not always meet the expectations of the client.

Know your manual date math! And beware the perils of double bucketing!

1 comment:

Anonymous said...

Nicolas Ghesquiere has taken over like louis vuitton replica the main one beautiful, re-packaging all the antique Balenciaga handbags or possibly Replica Balenciaga Handbags locate the latest discerning lover. Balenciaga handbags and additionally many times Replica Balenciaga handbags leathers really are sleek and stylish, robust and additionally completely unique. Reality is basically no couple of handbags check an identical. All of these handbags ordinarily are not sole eye-catching but additionally really are truly useful additionally. Individuals come into play a lot of different shades want stones white, bubblegum pinkish, fast, gucci replica pewter, mac products alternative and additionally green. Individuals also come in many different fashions and additionally lengths and widths to pay whatever will want. Everyone should experience a number theseFirst (also called: Small to medium sized, Classique, The Dix, Lariat)This Balenciaga purse is basically fat-free by means of spherical 4 corners. The software programs there are a fabulous 18" shoulder complex tie. This approach purse retails in the world located at nearly and provide a fabulous serial area code. Locale (also called methods)This purse could be very commodious and additionally ideal for all the time benefit from. The software chanel outlet programs, there are a fabulous 24" shoulder complex tie. It consists of a fabulous serial area code about and additionally retails for approximately. Succeed (also called Work, Considerable)Handbags in that trend right from Balenciaga possess serial area code, and additionally retails in the world just for on the affordability. The software chanel replica programs and additionally is great for having recordsdata and additionally folder from workplace to make sure you place and additionally lower back.