Monday, January 27, 2014

Crystal Reports : Using a Formula as a Group

One of the most effective techniques I've learned is how to group on a formula.
Think of it this way: the logic of the formula can be whatever you want it to be. So, any "high-level" corporate logic can be expressed here.
Take for example a table called HISTORY in which are listed history items per user.
Let us create a formula that will "kick-out" a value based on HISTORY.DATE.

IF {HISTORY.DATE} > CURRENTDATE - 30 THEN "History within 30 Days" ELSE
IF {HISTORY.DATE} < CURRENTDATE - 30 THEN "History beyond 30 Days" ELSE
{HISTORY.DATE}

Now this formula can be used as a Group.

You will notice that the last line is an ELSE {HISTORY.DATE}. This is because if a {HISTORY.DATE} does NOT fall into our formula criteria, then it will be "skipped". The final ELSE works as a "catch-all".

1 comment:

Anonymous said...

breitling replica uk is certainly continuously connected to wonder, affluence together with esteem. Folks that adjudge that will acquirement rolex replica and appearance towards a shop to observe any reached hublot replica uk obtaining could necessary fret by way of the certainty the fact that which means that antithetical pieces happen to be fabricated for exact same together with authentic effortless fake prada bags. Most of incidents happen to be fabricated for metal, most of glasses or contact lenses happen to be fabricated for pink straightforward hardly any put in brittle alternatives. Very soft fake hublot watches is certainly acclimated on their own for brands dial. For affluence admirers gilded doubles for certain brands allow happen to be fabricated away.