Link to home
Start Free TrialLog in
Avatar of AptDev
AptDev

asked on

Sorting On Subreport Data

I would like to sort by subreport data.  I have passed a date back from my subreport to my main report using a shared datevar, and put it in a formula.  But Cyrstal doesn't show that formula in my sort expert.  I am using Crystal XI.  Is there a way to sort on information from a subreport?
SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AptDev
AptDev

ASKER

The subreport is in the details section.
What is your formula?

mlmcc
Avatar of AptDev

ASKER

Thanks mlmcc... in the subreport I have created two formulas.  

The resetter formula goes in the group header, and it goes like this:

Shared DateVar SortDate := date('01/01/1947');


Then in the detail section of the subreport, I have the max date finder formula like this:

Shared DateVar SortDate;
  if {operation.trans_date} > SortDate then
    SortDate :=  {operation.trans_date};


Then in the main report I have created a formula called Sort_Date that looks like this:

Shared DateVar SortDate;
  SortDate;


The date seems to be passing back and forth in the formulas just fine, it's just that I can't seem to get the sort wizard to recognize or even see the formula to allow me to sort on it.

From the look of things, I'll probably have to rewrite the report without the subreport.  I was just hoping somebody had run into this before and knew a trick I haven't learned yet.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad i could help

mlmcc