Solved

Running Total based on Parameters

Posted on 2014-02-11
6
260 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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