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

Get Records to Sort 1

Status
Not open for further replies.

stuckDuck

Programmer
Jun 30, 2010
30
CA
From a subreport, I want to display the follwing information in this order onto the main report.

1. Named Billing Party, 2. Owner, 3. Tenant


I have the record selection expert set as this order but the records do not show up in this order on a consitant basis. The Record Sort Order will not let me edit the order.

Help appreciated.
 
This is unclear. Where is the subreport located (main report section)? Is it linked to the main report? On what fields? Are you talking about the sort within the subreport? Or in the main report? Note that you cannot sort the main report by shared variables from the subreport.

-LB
 
Sorry for being unclear.


Everything in the main report is supressed without drill-down except the group footer. The subreport is in a group footer. The subreport is linked to the main report by the account numbers.

The main report prints the account number and fee. The only selection criteria is the account number prefix = 1080.

The subreport selection criteria is
{role.acctno} = {?Pm-MAIN.acctno} and
{role.ROLE_TYPE} in ["BILLABLE", "OWNER", "TENNANT"]

 
You want the data as 1. Named Billing Party, 2. Owner, 3. Tenant, but this data is found in the subreport? Maybe you've got the subreport and the main report the wrong way round. The main report will only sort using features of its own detail record.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Yes, if you are expecting to sort by categories available only in the subreport, then you need to make the sub the main report. I'm still unclear on whether you want this sort within each account or whether you want to sort the accounts by these categories. If the latter, you should make the sub your main report and then group by account type and then by account.

-LB
 
If the selection expert is in this order does the report data display in this order?

role.ROLE_TYPE} in ["BILLABLE", "OWNER", "TENNANT"]



The error only occurs when I export into excel. Otherwise the report displays in correct order.
 
The order of the values in the array is irrelevant. You could either group on the roletype field or go to report->sort records and add it as the sort field, but note that records will sort by the group field first and then within each group instance by the sort field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top