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

Sorting a field by combining main and subreport

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
Hello,

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.
Example:
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.

Thanks.
 
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.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top