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!

Printing multiple records when query returns only 1 resultset

Status
Not open for further replies.

birdprogrammer

Programmer
Feb 9, 2005
6
US
Hello,

I have created a report that is printing additional records in the detailed section. When I copy and paste the sql stmt into query analyzer, it returns only one resultset. Any suggestions on where to look to troubleshoot this problem.

Thanks,
MH
 
Check the Crystal commands in your record selection. Post those and the SQL and maybe someone can figure it.

Note that not everything in record selection will get translated into SQL. Some of it will be reserved for Crystal to do itself, which is less efficient but not always avoidable.

It helps to give your Crystal version, since newer versions have extra options, and some extra problems. My workplace is currently upgrading from Crystal 8.5 to Crystal 10,

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
In my record selection, it has {?RMA #}={SVC05000.RETDOCID}.

My sql:
SELECT SVC05000.RETDOCID, SVC05000.CUSTNMBR, SVC05000.CUSTNAME, SVC05000.ADDRESS1,
SVC05000.ADDRESS2, SVC05000.ADDRESS3, SVC05000.STATE, SVC05000.ZIPCODE, SVC05000.COUNTRY,
SVC05000.CITY, SVC05000.USERDEF1, SVC05000.USERDEF2, SVC05000.USRDEF03, SVC05000.USRDEF04,
SVC05000.USRDEF05, SVC05000.CSTPONBR, SVC05200.Return_Item_Number, SVC05200.Return_Item_Description,
SVC05200.Return_U_Of_M, SVC05200.QUANTITY, SVC05200.SHIPMTHD, SY03900.TXTFIELD
FROM (ASI.dbo.SVC05000 SVC05000
LEFT OUTER JOIN ASI.dbo.SVC05200 SVC05200 ON (SVC05000.RETDOCID=SVC05200.RETDOCID) AND (SVC05000.CUSTNMBR=SVC05200.CUSTNMBR))
LEFT OUTER JOIN ASI.dbo.SY03900 SY03900 ON SVC05000.NOTEINDX=SY03900.NOTEINDX
WHERE SVC05000.RETDOCID='rma000000000249'
ORDER BY SVC05000.RETDOCID

I'm running Crystal 9.2.3.970.

If I remove the record selection code, the report returns a few thousand records. So it looks like it has something to do with that. But when I run a select * from svc05000 WHERE SVC05000.RETDOCID='rma000000000249', the resultset only has one record too.

Additional thoughts?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top