Monday, October 3, 2011

Crystal Reports : Grouping on a Formula

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".

3 comments:

Anonymous said...

I am trying to do this (have done so on other reports) but the current report I am working on is not allowing my to generate a group from a custom formula. Any help as to why this may be happening?

林磊 said...

2016-2-20 leilei
adidas trainers
polo outlet
michael kors handbags
hollister co
coach outlet online
coach factory online
adidas superstars
coach outlet online
cheap basketball shoes
michael kors handbags
michael kors outlet
nike air max
burberry outlet
longchamp soldes
coach outlet
coach outlet
coach factory outlet
michael kors handbags
toms shoes
toms outlet store
longchamp outlet
michael kors handbags
true religion
marc jacobs handbags
toms outlet
michael kors outlet
adidas superstar
cheap ray ban sunglasses
jordan 3s
mizuno running shoes
tiffany jewelry
cheap jordans
north face outlet
nike roshe run
louis vuitton handbags
michael kors bags
jordan 3 white cenment
louis vuitton outlet
air jordan homme
ugg outlet

Juane Weg said...

michael kors bags
burberry handbags
coach sale
salvatore ferragamo belt
oakley.com
coach factory outlet
fendi belt
louboutin outlet
coach outlets
fitflops sale
burberry sale
michael kors outlet store
cheap michael kors handbags
coach store
coach factory outlet
vans outlet
coach wallet
christian louboutin outlet
mcm
converse sale
clarks shoes sale
red sole shoes
hermes belt
jordan shoes for kids
north face jackets
coach outlet online
vans outlet
timberland boots
lebron james shoes
columbia jackets
michael kors outlet online sale
michael kors outlet online
fitflop shoes clearance
nfl jerseys cheap authentic free shipping
michael kors outlet
coach handbags
oakley store
ferragamo outlet
nike factory store
micheal kors
fitflops sale
michael kors outlet clearance
rolex watches for men
coach wallets for men
hermes scarf
20160830yxj