Solved

Running Total based on Parameters

Posted on 2014-02-11
6
270 Views
Last Modified: 2014-04-02
Hi Experts,

I have a field that is a summary of   fields...

@TempQtyOnHand = {QtyOnHand} + {InTransit} - {GrossRequired} and placed at the Detail

The report allows multiple values in the Parameter... This report is then grouped on this
parameter

What I need to do is create a RunningTotal on the @TempQtyOnHand field and have it continue to run through each Detail and never reset...

Parameter Value:0001    
                     QtyonHand        GrossRequired    In Transit
Record1         100                       1000                        20
Record2         30                           80                           10
Record3         50                           100                         40
Record4         10                             2                            5

----------------------------------------------------------------------------------------

Parameter Value:0002  

In this 2nd Parameter Value...the {QtyonHand} becomes a '1stCalculated' field based on {QtyOnHand} + {InTransit} - {GrossRequired}  from the Values in the 1st Parameter Value..

The '2ndCalculatedField '  is a summary of '1stCalculatedField'-GrossRequired


   
                     1stCalculatedField      GrossRequired           2ndCalculatedField
Record1         -880                                  1000                                120
Record2         -40                                      80                                   40
Record3         -10                                    100                                   90
Record4         13                                       2                                      11



There could be up to 20 Values entered into the Parameter Field..

The 1stCalculatedField and 2ndCalculatedField are essentially running totals that will never reset...

Record1, Record2, Record3, Record4 will always be the same regardless of how many values are in the Parameter Field... Could be 30 records per group
0
Comment
Question by:Mikeyman_01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39852450
A record can only appear in one group and if I understand what you want is really a series of reports based on the parameter values.

Do I understand the problem?

Grouping is based on values in records not the values of a parameter.  You can use parameters to control how a report is grouped by specifying which field the report is grouped on but you can provide a parameter with 2 values and expect to get 2 groups.

A record is always in a group but it cannot be in more than one group.

Consider a class of students.  You have A students, B students, etc.  A student can be a in the A group on one test and in the B group based on a second test but he can't be in both groups based on 1 test or  a collection of tests.

Will the parameter values always be in order?
For instance the values 0001, 0002, 0003 would specify 3 different grouping and 3 different sets of calculations.

Can the order be 0002, 0001, 0003?
If they will always be in order you could have as many subreports as desired on the report and have each be shown or suppressed based on the values in the parameters.

mlmcc
0
 

Author Comment

by:Mikeyman_01
ID: 39853504
The parameter values will always be in order...'series of reports based on parameter values' sounds like you understand the problem
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39853892
I think the subreport idea is the only way to get this to work.

Create each report you want to see.
Create a new report
Create multiple detail sections
Drop a subreport into each in the order you want to see them.
   One subreport per detail section
You can then suppress the detail sections with formulas like
   '0001' IN {?YourParameter}

mlmcc
0
 

Author Comment

by:Mikeyman_01
ID: 39854754
Holy Shit...
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. …
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 …

737 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