Solved

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

Posted on 2004-09-13
6
262 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

11 Experts available now in Live!

Get 1:1 Help Now