Skip to Content
0
Former Member
Apr 25, 2007 at 05:08 PM

Creating a variable Group Header Field

14 Views

Post Author: Jodonnell

CA Forum: General

Hey Everyone,

Hopefully this is an easy answer. I am new to crystal reports, I am used to Access. I know a small amount of SQL and primarily use VB. Here is what I am trying to do:

I want to make a field that says that the account "matures under 90 days" or matures between 1 year and 3 years depending on the amount of days remaining to reach maturity which is already a field. Then I can use this field to group accounts correctly. So here is what I am trying with limited success. I am making a formula field that says:

If {@DaystoMature} < 91 then "Matures within 3 Months" else If {@DaystoMature} > 90 and < 366 then "Matures between 3 Months and 1 Year"else if {@DaystoMature} > 365 and < 1096 then "Matures between 1 year and 3 years"else if {@DaystoMature} > 1095 and < 1826 then "Matures between 3 years and 5 years"else if {@DaystoMature} > 1825 then "Matures over 5 years"

Now if I just have the top line there and remove the bottom 4 than it works and will correctly display the message on accounts that mature in less than 91 days. However if I attempt to add the rest I get errors. How can I make this work properly? Thanks very much for any help that you can offer.

James O'Donnell