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!

Unable to sort fields

Status
Not open for further replies.
Aug 27, 2003
428
US
Hi,

I have 4 fields that I have grouped by to fix the sort order.

ClassID
EntityID
SubEntityID
TradeDate

The order of records is now fixed but I have the page breaking after each record.

I tried the not onlastrecord but this did not help.

How do I prevent each record from showing on a new page?

thanks
junction123
 
Well, where do you want the page break? In the section expert, which section have you formatted to "new page after"? Did you format any section to "Print at bottom of page"?

-LB
 
No, I did bot format any section to print at the bottom of the page. I di not have any footer.

I have grouped by an Address which appears for some records at the top.

Records that have an address are sorted and records that do not have an address are not sorted.

I have the foll groups that appear as below under group expert.

Address
ClassID
EntityID
SubEntityID
TradeDate

I suppress the group header sections for these and the group footer I did not suppress.

I tried adding another group above Trade date called TransactionType since this field has values Redemptions and Subscriptions but that did not help.

For records having Address at the top, records are sorted by TradeDate eg.

23-Sep-2008
21-Jan-2009
14-May 2010

But for records that do not have an address entry at the top

12-Feb 2009
24-May-2006
23-Jan-2007
25-Mar-2009

I want the records to be sorted the same way.

How can I fix this?

Thanks,
junction123

 
Insert a maximum on Trade Date at the Address group level. Then go to group sort->All and select the maximum of Trade Date as your group sort field. Not sure whether it should be descending or ascending. Try each.

-LB
 
I inserted a formula MAXIMUM({MaxTradeDate}) at teh Address level.

I am not sure about the second piece. I am using Crystal with VB Dot Net not standalone.

Do I need to go to Group Expert at Address Level and sort on MaxTradeDate ascending or descending?

Thanks
junction123
 
Is it the option under group expert at Address Level

Click on Options -> Change group options and then under IOptions tab there is Customize Group Name Field?

Should choose a formula here for Maximum(TradeDate)? And under Common

When the report is printed the records will be sorted and printed by

@AddressInformation

in ascending order

Thanks
junction123


 
I tried using formula as a Group Name under Options at the Address Level using group expert by clicking Customize Group Name.

Maximum({Detail.Trade_Date})

I get an error that formula must be evaluated.

Thanks
junction123
 
No, it has nothing to do with the group expert. It would either be report->group sort or report->topN/group sort.

-LB
 
I see Report - > Record Sort Expert

and I see Report - Selection Formula.

This is an older verison of Crystal either 9.0/10.0.

Is the option available only in Crystal standalone 11 or Crystal 2008?

Thanks
junction123
 
Group sort has always been available as far as I know. What options do you see under "report" in the toolbar?

-LB
 


I see Hierarchical Grouping Options.

Available options are

Select Expert
Selection Fromula
Formula Workship
Select Expert
Group Expert
Group Sort Expert - this option is disabled though
Hierarchical Grouping Options
Record Sort Expert
Report Options
Set Date and Time
Summary Info

Thanks
junction123


 
The group sort expert is what you want. It only is activated after you insert a summary on a field. So insert the maximum and then see if it is activated.

-LB
 
I see you misunderstood earlier. Adding a summary formula does NOT activate group sort. You have to place the date field in the detail section and right click on it->insert summary->maximum. THIS is what activates the group sort.

-LB
 
The Group Sort Expert is activated. I sorted on the summarized field TradeDate. But this did not fix the dates order within the below grouping for records that do not have an address
ClassID -> EntityID-> Address(printed on top for records that have an Address).

I notice that this happens only in two pages out of a total of 6 pages.

Should I add the grouping on TradeDate as well? I took the grouping out while testing.

Also for records not having an address I do not wnat teh page to break as is the case now. The page breaks on change of ClassID.

Thanks
junction123
 
Did you insert the maximum at the address group level?

-LB
 
Yes. And I put the maximum at a suppressed section so it does not show up in the report. The group sort expert option got enabled.

Not sure what I am doing wrong.

Thanks,
junction123
 
Actually, let's back way up. If you are only displaying the detail section and you want details in ascending order by date, Then just group on address and add a sort on date. Period. Remove all other groups. You can still add them as fields in the detail section.

-LB
 
But when I look at the current output in the spreadsheet, each TradeDate is grouped within an EntityID which is then grouped within ClassID.

Then should I not have the group for the ClassID, EntityID and TradeDate?

When you say add a sort on date, you mean teh Group Sort Expert and summarize on max(TradeDate)?

Thanks,
junction123
 
This messes up the grouping for the ClassID, EntityID and the TradeDate is still not in order ascending for a particular ClassID and EntityID group.

Thanks
junction123
 
I notice that I have a Record Sort Expert on

Address
TradeDate
SubEntityID.

I had this during my testing and did not take it out. Maybe this is messign up the report order?

Thanks
junction123
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top