Solved

Crystal Reports 10 - how to summarize data across groups and make available to all groups

Posted on 2004-09-13
6
264 Views
Last Modified: 2012-05-05
I have a reports with the following group structure:

Chain - Group 1
Rep - Group 2
Due Date - Group 3

A rep can belong to more than one chain.  I need to know how many chains the rep belonged to at a particular due date to and then make that total it available to a formula in the due date group.

For example, Rep A services Chain 1, Chain 2 and Chain 3 on due date 7/1.  I need to get the value 3 into a formula in the due date group so I can divide a total amount by that number to share costs across all chains the rep serviced in that due date.
0
Comment
Question by:kristenhazard
  • 2
  • 2
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 12050440
I am nt sure if it can be done easily.  How many Reps?

It might make more sense for this report to group it differently.

mlmcc
0
 
LVL 28

Accepted Solution

by:
bdreed35 earned 500 total points
ID: 12053817
You could do this using a subreport and a shared variable.

Your subreport would need to get the total amount by rep.
When you add it to the main report, link on rep id (perhaps other fields as well), and then place the subreport in the Group 2 (Rep) Header.  It would be a good idea to create a second Group Header 2 section and place the subreport in section b.
Your subreport is there just to perform a calculation and to provide that value back to the main report.

The next step would be to create several formulas.

1. @Init - Place it in Group Header 2b - Main Report
shared numbervar rep_amount := 0;

2. @Set - Place it in Subreport Report Footer.
shared numbervar rep_amount := count({table.chainid}); //you may be counting a different field here

Now, you can reference the shared variable in your own calculations in the main report to determin that share costs.
0
 

Author Comment

by:kristenhazard
ID: 12055621
Thanks bdreed35, I'll give that a try.
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 12244404
I believe I offered a suitable solution, but the poster never responded back.
0
 

Author Comment

by:kristenhazard
ID: 12244474
OK, I was not finishing the accept process in the second page. I have now accepted bdreed35.  Sorry for the mix up.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now