I'm using CR2008 with a SQL DB and need to create a conditional sort. The report has 2 RH, 2 PH, 1 group and 1 detail section. If the user selects the detailed sales report, the first RH, PH and detail lines are displayed and I need to sort by salesperson, customer, invoice. There is no grouping for this one. If the user selects the customer summary report, the second RH, PH and the group display (which is grouped by customer). Everything is working perfectly except for the sorting. The various unneeded sections suppress depending on the report type. The sorting works for the summary but the detailed one gets completely muddled because it is doing the group sort first and then the other fields.
The Record Sort Expert is showing:
Group #1: CustomerN
A-SalesmanN
A-CustomerN
A-InvoiceN
A-JobN
I need something like this:
if {?ReportType} = 1 then
{SalesmanN} ,{.CustomerN},{.InvoiceN},{JobN}
else
{CustomerN}
but I don't know how to set it up or where to place it.
Thanks in advance for any help!
The Record Sort Expert is showing:
Group #1: CustomerN
A-SalesmanN
A-CustomerN
A-InvoiceN
A-JobN
I need something like this:
if {?ReportType} = 1 then
{SalesmanN} ,{.CustomerN},{.InvoiceN},{JobN}
else
{CustomerN}
but I don't know how to set it up or where to place it.
Thanks in advance for any help!