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!

Report Sorting 1

Status
Not open for further replies.

pnad

Technical User
May 2, 2006
133
US
Hi,

I am using Crystal Reports 10.0 and I have a main report and a subreport. I have placed the subreport in the report footer. The key in both these reports is the ID number. Is it possible for me to sort the entire report (main and sub included) by the ID number? I am not passing any values between the main and the sub report.

Thanks.
 
If you are asking whether somehow you can sort records from both the main and subreport together, the answer is no. The subreport and its contents are a separate object. The only way you could potentially do this is to use a command as your datasource where you use a union or union all to combine the two sets of data into one set of fields. This requires corresponding fields (of the same datatype and in the same position in the select statement) in both sets of data. Once you have done a union, one field will include data from both sides of the union statement, so you could then sort on the field.

-LB
 
Thanks, lbass.

As usual, your suggestion was very helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top