We help IT Professionals succeed at work.

Crystal reports-get previous database field

i98petku asked
Medium Priority
Last Modified: 2008-03-04
I have a crystal report showing deal numbers and their corresponding cash flows. It looks something like this:

Deal no       Cash flow amount         Cash flow date
1                 5,555                             2006-03-01
1                 6,899                             2006-04-01
1                 5,000                             2006-04-03
2                 300                                2006-02-01
2                 55                                  2006-04-01
3                 428                                2006-01-01
3                 300                                2006-02-01

In the report I need to include an additonal field indicating on which date the previous cash flow of the deal took place, i.e. something like this:

Deal no       Cash flow amount         Cash flow date            Previous cash flow date
1                 5,555                             2006-03-01                        -
1                 6,899                             2006-04-01               2006-03-01  
1                 5,000                             2006-04-03               2006-04-01                
2                 300                                2006-02-01                       -
2                 55                                  2006-04-01               2006-02-01                      
3                 428                                2006-01-01                        -
3                 300                                2006-02-01               2006-01-01  

How do I "save" the previous cash flow date to appear as information in connection with the next cash flow?

Kind regards
Watch Question

Top Expert 2004
Create a formua like this and place it next to Cash Flow Date:

if not onfirstrecord and previous({table.dealno}) = {Orders.dealno} then

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


You have really saved me some time there. Thanks! It works great!

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.