Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sorting a field by combining main and subreport

Sorting a field by combining main and subreport

Sorting a field by combining main and subreport


I've created a report using CR 2016. I am using 2 stored procedures with the following fields:
SP1: Date1 Activity Comments
SP2: Date2 Inspection Comments

In the main report, I am using SP1 and displaying the fields from above.
In the subreport (located in Report Footer of the main), I am using SP2 and displaying the fields from above.

I would like to know if there's a way to somehow sort based on Date1 and Date2.
1/1/2019 (Date1) Activity1 Comments1
2/5/2019 (Date2) Inspection1 Comments1
3/1/2019 (Date1) Activity5 Comments5
3/5/2019 (Date1) Activity7 Comments7
4/9/2019 (Date2) Insepction8 Comments8

Currently, the main report is sorted separately as well as the subreport.


RE: Sorting a field by combining main and subreport

Any comments? Anyone? ponder

RE: Sorting a field by combining main and subreport

If you were working directly with the tables comprising the stored procedure, the answer would be to use a command with a union all statement in order to merge the corresponding fields in each set of tables, thus allowing a sort on date.

You might be able to do this with stored procedures, but I cannot test this. There is a potentially helpful post in SAP archives, entitled: “Merging Data from two stored procedure in a single CRYSTAL REPORT” (sic). See if you can make this work within the Crystal command.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close