Jump to content

Writing If/Then stmt in Crystal


Recommended Posts

Guest haaron
Posted

You all have been so wonderful considering my level of ignorance (and my inability to remember anything from my programming classes 4 years ago.)

On to my next question.

I need an if/then statement but can't remember how to write one to do what I need. Here's what I'm trying to accomplish:

On a Plan Level, Total Compensation and Deferral Amount for only those participants that are eligible.

I found Category (PLANEE.CATEGCD) and do NOT want to include 8, B, C, or E in my totals. So, if PLANEE.CATEGCD = 8 then not included in total, etc.

Particpant1 $70,000 $10,000 8

Participant2 40,000 1,000 2

Participant3 50,000 3,000 3

Participant4 80,000 11,000 E

Total Eligible 90,000 4,000

Does this make any sense? I've been looking for my Basic programming books but they must be under all the other boxes in the basement.

Any help will be greatly appreciated.

Heather

Posted

you could get real lazy, and when printing your report, select the categories you want to include on the report.

I am assuming at 8.0 the button exists 'select category'.

the trick is to select the report under 'custom'. e.g. if it is a census report, and you try to print from the census list the slect category will be grayed out, but under custom you get the option. don't ask me why it is that way. maybe it is a bug that has always existed.

Guest haaron
Posted

Tom

Your solution works for this instance but I would like to try creating the report with the If/Then statement.

My boss was pleased to see about the Category button in Custom Reports. Thanks for that tip.

Heather

Posted

Heather:

you might try the following:

open the report in Crystal

click on REPORT

SELECT EXPERT

new

and select PLANEE.CATEGCD

Then tell it PLANEE.CATEGCD < 8

this should tell the report Select all employees whose cat code is less than 8. Therefore it should ignore any 8 (and 9) and any Letters (A, B, C, etc)

Glad to hear the tip worked!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Terms of Use