Wednesday, February 27, 2013

Crystal Reports : Consolidating your Buckets

Let us suppose further that we are creating a crosstab object to show us where the INVOICES land in date buckets. You would want to specify each ROW of the crosstab as your summary (i.e. COUNT or SUM). You would need, then, to specify your COLUMNS within the crosstab as a single, unified function that will "kick out" the correct "bucket name" based on INVOICES.DATE.

We will call our unified crystal function DATEBUCKET and the code would look like this:

IF {INVOICES.DATE} IN CURRENTDATE TO CURRENTDATE - 30 THEN '0-30 days' ELSE
IF {INVOICES.DATE} IN CURRENTDATE - 31 TO CURRENTDATE - 60 THEN '31-60 days' ELSE
IF {INVOICES.DATE} IN CURRENTDATE - 61 TO CURRENTDATE - 90 THEN '61-90 days' ELSE
IF {INVOICES.DATE} < CURRENTDATE - 91 THEN '91+ days'

This code consolidates our date buckets into one unified crystal function that can be added as a Group or a Crosstab column. Obvoiusly, the bucket names are "kicked out" as described above. These will ultimately be the names of your groups.

Again, watch your math to guard against double bucketing!

1 comment:

Anonymous said...

Accommodating, endless and additionally chic- however these are all the Gucci handbags. You can be fairly certain hermes replica the just about every single penny paid out for the beautiful handbags really are important. Gucci handbags comprise from the imitation leather cloth. All the Gucci Decoration Travelling bag back pack comes with grey now for the color choice and fit a large amount of different shades on the suit. It's always fashioned with gold-tone shiny steel pieces at the top holds the road, that could be mounted off with marketing studs. An alternative effective at this point an unusually unconventional purse right from Gucci are often the Gucci Style considerable overcome handbags. The software is about the top handbags right from Gucci if you have a lover need. It's always preferred for toting off-duty thing. All the grip back pack created from chanel replica in a imitation leather is quilted for type to earn the software gorgeous and additionally fashionable. Any time for sure, afterward delight you should never forget to earn individuals right from Italian imitation leather considering the software is constantly any handbags like robust like without end. Also it is advisable to construct and additionally provide any beautiful handbags from high quality handbags brands for the markets frequently. Make sure you produce superior quality and additionally trend that you really need handbags on daily basis for those gucci outlet justification which usually purchasers pay for a detailed focus on this pair of attributes normally. Chanel handbags predict class and additionally timelessness. A number the country's handbags which has been employed regular and additionally over are often the Antique Flap Back pack, Trendy Effective back pack, Sac Durante Cuir Doux back pack, and additionally The summer time 2010 handbags.