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

How to sort when using sub-reports ? 1

Status
Not open for further replies.

ianholmes

Programmer
Mar 24, 2001
61
GB
I need to access 4 SPs, which will return the same 3 fields : code, text1, & text2.

The SPs are not linked in any way :
Data might not be returned by any of them.

I have written the report (Crystal XI) using 4 sub-reports, and the data comes back OK.

But when I try to select the Sort Expert, to sort on the code field, it is greyed out.

So, is it not possible to perform such a sort, when using sub-reports ?

If not, can anyone advise of a better way to handle the above scenario ?

Many thanks
 
Data from a subreport can be returned using Shared Variables, but can only be used by the seciton below the section with the subreport. So it can't be used for sorting, unfortunately.

Using SQL and Stored Procedures can assemble data from different files in a way Crystal cannot. The Stored Procedure can then be fed into a Crystal report, with all of its ease of use. Is that feasible for you?

Also why four separate subreport? Is there any way they could be linked in the main report?

Another option would be to raise one subreport to main report level and have the other three as subreports at detail line level. Expensive in machine time, but that gets cheaper all the time.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top