Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with the Next function in Crystal 11

Status
Not open for further replies.

APAMurdock

IS-IT--Management
Apr 16, 2012
2
US
I use Crystal Reports 11 connected to a SQL Database. One if the tables used in the report is called session (see example below).

SessionID Description Year
1 Spring 2000
2 Summer 2000
3 Fall 2000
4 Spring 2001
5 Summer 2001
6 Fall 2001

When the report is ran, the user is prompted for the Description and Year. In the report, I would like to display the next Description and Year record. So if the user chooses Fall 2000, then I want the report to display Spring 2001. When i use the Next function "Next ({Description})" and place that formula in the report, I get the same description that the user typed in, not the next one.

I'm new to this forum, so if I didn't write this in the proper "format" please let me know.
 
If you are filtering the data based on the prompt, then Next()won't work for you. Next() looks at the data that has already been retrieved for the report - it does not requery the database.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Thanks for the response. You are correct, I am filtering the data based on the prompt. I guess I'll have to think of a different way to write the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top