=> Crystal Reports: Rate field based on Qty field

R

Rhonda Fischer

Hello,

I have created a report to display my deliveries. Listed
are customers and number of items purchased. I would
then like to display the rate at which these items are
charged based on the quantity purchased.

For example:

If (Qty = 1) then
Rate = Pallet1Rate
else if (Qty >=1) and (Qty <=2) then
Rate = Pallet1-2Rate
else if (Qty >=3) and (Qty <=4) then
Rate = Pallet3-4Rate
endif

The text box on my report is unbound but I am able to
select for its control source any of [Pallet1Rate],
[Pallet1-2Rate] or [Pallet3-4Rate] however I would like
this to be determined based on another field on the form
the Qty.

Do I need to somehow build this into the query on which
the form is based? Can I do an SQL query with an embedded
IF stmt?

How can I do this? Thank you for any suggestions that
you may have.

Kind Regards
Rhonda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top