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

Grouping with shared stringvar

Status
Not open for further replies.

rocky22

MIS
Dec 23, 2002
4
Hello

I need to use a sub report and I want to create a group in the main report using a formula containing a shared stringvar from the sub report.

Crystal 8.5 does not seem to allow this......if so.... are there any suggested work-a-rounds

Thanks
 
This scenario sounds like the reverse of what might work, consider placing the subreport as the main, and the main as the sub.

Assuming your intent, that you intend to create a shared var at the group header level, understand that the main report will NOT know all of the shared vars at print time, so it cannot group/sort on this variable in advance.

Perhaps if you identify the requirements for the report, someone might find a simpler approach to the problem.

Include example data and expected output, if you're allowed to create Views/SP's, and the type/version of database, and version of Crystal.

-k kai@informeddatadecisions.com
 
Thanks for the response
The concept of the report is pretty simple - a top n report for a selected product's sales volumes (descending) by salesperson

The Tables used are:-

SalesOrders
Customer
CustomerAddresses

The salesOrders table has an equal join to the Customer table (using account no.) and a left outer join to the customer addresses table (again using account no.).

Using ODBC (Easysoft)

The problem area is that due to the data structures, the salespersons code needs to be extracted from 1 of 2 places.
From the Customer Addresses table if the order has an 'address code' or from the Customer table if there is not an 'address code' on the order.

The CustomerAddresses table may contain many entries for a customer/order, or no entries for a customer/order.

Without a sub report I can get the SalesPerson Code from either the Customer table or from the CustomerAddresses table OK , but the report was returning the salesorders n times and therefore I was unable to automatically sub-total accurately.

If I go back to this idea can I have/use a running total in a top n report?








 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top