Limiting records for sample report in Crystal Reports

I am using a CrystalReport control in my program.  I would like to give the user an opportunity to view a sample report consisting of x (user's choice) records.  Is there a way to pull the first (or any) x records from the database?  I've tried the following statement in my program, but it returns a run-time error message "This function cannot be used because it must be evaluated later."

crwReport.SelectionFormula = "RecordNumber <= x"

Any ideas?

Thanks in advance!
dcampagnaAsked:
Who is Participating?
 
mrmickConnect With a Mentor Commented:
Sure, just create a temp recordset and put x number of records into the temp recordset.  Use the tempory table to generate the report.  
0
 
dcampagnaAuthor Commented:
Thanks, I'll give it a try!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.