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

Record Selection /Formula Question

Status
Not open for further replies.

Danice

Programmer
Aug 29, 2002
1
0
0
US
Hi,

I have a report that requires a classification banner which should denote the highest class level in the report. (I'm using CR Developer 8.5.0.217)

I need to read the class level from a the database field in each record and store the highest classification to be shown in the report header.

The formula that I have is doing just that but it is reading ALL of the records instead of the records specified by the "Record Selection Formula". Which brings up my second
question - does the "Record Selection Formula" in the Select Expert determine the
WHERE statement that will be used to query the database? It seems that this formula is not being applied until after CR has read all the the records.

I could really use some assistance -- I've been working on this problem for a while.

Thanks alot
 
Any WHERE clauses which need to be passed to your database, is usually passed from the information included in your record selection formula.

So, '{Orders.OrderID} = 123' in your formula translates to SQL as SELECT ...(your fields)... FROM Orders WHERE Orders.OrderID = 123

However, there are some queries you are able to create in Crystal which do not pass to the database.

If you're unsure about whether stuff is passing to the database, go into the Database menu, and check out Show SQL query.

If you still have queries remaining about this, post your selection formula, your highest classification formula, and your feedback from Show SQL query.

Good luck,

Naith
 
Try grouping by the Class and sorting by the classification in descending order.

Place the Classification in the group header, and suppress the details and group footer.

The maximum classification per class will always show.

As for limiting rows, share the record selection criteria with us, we may be able to get it to pass through to the database.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top