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

Create group based on whileprintingrecords variable

Status
Not open for further replies.

UHsoccer

Programmer
Apr 24, 2003
139
US
I return a sorted shared array from a subreport which contains names by number of transactions.

In the parent report I want to create a group based on the entries in that array in the same order. I created a formula to do so and it shows the correct names when I insert it in the report.

When trying to insert a new GROUP, that formula name is not displayed. Hence no group can be based on that.

Any thoughts?
 
A subreport is the wrong place to generate group by data for the main report.

It sounds like your sub should be your main.

Hard to say, but you'd be better served describing requirements:

Crystal version
Database and connectivity
Example data
Expected output

-k
 
Here is the structure (Crystal 10)

Sub-Report-1 - Create a list of the top N users (based on web hits). I create an array with names and sort, then redim to N (else the arrays get too large).
Using: shared stringvar array user

All output is suppressed by default


Main-report - Go through those users - Here the requirement is to list them in the same order as the sorted array returned them from Sub-Report-1
Trying to group on formula:
whileprintinmgrecords;
shared stringvar array user;
numbervar userIndex := userIndex + 1;
stringvar userGroup := user[userindex];

Sub-Report-2 - Get the top M web sites that were visited. For each user I create a (sorted) array of the number of times a specific web site was visited.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top