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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RecordSelection Formula 1

Status
Not open for further replies.

clydejones

Programmer
Jan 11, 2001
153
US
Hi Y'all

Here I am again. I'm trying to write a recordSelection formula to retrieve certain records that I want. When I write recordSelection({tableName.fieldName}), I get "too many arguments have been given to this function". Does any one know how to use this function to get only the records a person wants? Do I need to use the recordNumber in conjuction with the recordSelection function?

Thanks In Advance,
Clyde
 
Hello

Can you give more detail on your issue. For instince, are you wanting to set the record selection in a front end application or in Crystal reports itself.

If it is from a VB front end application and you are using the crystal control (OCX) then

'The following will place the specified selection formula into the report or append it to an existing one

CrystalReport1.SelectionFormula = "{Table.Field} = Criteria" - syntax should be exactly as it would be in the Crystal Reports Formula Editor.

If you are using a function that is in Crystal reports itself, could you be more specific on what you are trying to accomplish?

E. McEvoy
Crystal Reports Consultant
 
E,

Thanks for your response. I am writing formulas for Crystal Reports itself. I think I figured out how to use the recordSelection() and recordNumber() in formulas. Out of 21 records, I can suppress the values per recordNumber(). However, I do not want to bring back all 21 records with one formula. I only want to bring back 1 record out of the 21 records per formula. I am trying to use the formula in the details section. I've tried to use the formula in the Page Header, but only can see the first record.

Thanks,
Clyde
 
To select records, you don't need the function. You don't write a formula FIELD. You write a selection formula using the select expert (Report Select Expert) or using the Record Selection Formula Editor (Report - Edit Selection Formula - Record).

In the select expert you just put in a field, a comparison type, and a value.

In the formula you would write a boolean (T/F) formula like one of these:

{charfield} = "X"

{numfield} > 50 Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top