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

Shared Variables / Sorting

Status
Not open for further replies.

rhardy

IS-IT--Management
May 6, 2002
9
US
I'm having a problem sorting a report based upon shared variables. I was hoping some experts out there could help me.

I have two subreports that I pass back 1 shared variable from each to the main report. Then, in my main report I have a formula based upon these two shared variables. My question is how can I sort my main report based upon the formula that uses both of these shared variables?

Thanks!
Rick
 
Hi Rick,
I suspect that you may not be able to sort on Share variables because of the Whileprintingrecord statement used for sharing data between the main and sub report.
The reason I think this is the case is because of the Crystal processing model. "Whileprintingrecord" variables are evaluated in Pass 2 phase of the model while sorting is done in the pre Pass 2 phase.
Refer to the "Multi-pass reporting flow chart" in the help to visualise the phases/passes.

If you post more details on some specifics, you might be abale to get a different way of approaching the problem.
If your using V9, you could write some SQL to eliminate the sub reports.

Cheers
Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top