Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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