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

Record Selection

Status
Not open for further replies.

msearle

Technical User
Nov 11, 2001
5
AU
Hi All,

I have a table (commentlines) used for recording comments against order lines in purchase orders. When you create an order, you are given the option of recording multiple lines of comments against each order line. Comments are optional only. From this, we generate an open order report showing order lines that have outstanding balances. We only want to show 1 comment line per order line in the report. So, the record selection specifies that the report show only the first comment line, but if no comment lines are recorded against an order line, then that order line is not shown.

So, is it possible to have the selection criteria say if there are comment lines against this order line, then show me only the first one, and if there are no comment lines, then still show me a record anyway?

Any help greatly appreciated.
Thanks
 
I would remove the select statement asking for only the first comment line and follow these steps:

1. Include an order line group and display all the order line details at this level.

2. Supress the details section (the details section would repeat for each comment line)

3. Place the comment field in the order line group under the other order line details. Consider placing the comment in its own section so that you can tick the 'suppress with blank' option.

If you need to see a particular comment line then order the records such that the one you want to see appears 1st.

E.g. If your comment lines have a line number field, sorting the records by line number will ensure that you get line 01 first and this is the record that will be shown at the order line group stage. Steve Phillips, Crystal Consultant
 
Or, your selection could be:

( IsNull({Line.Number}) or {Line.Number}=1 )


It has to be IsNull first. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top