Solved

Running Total based on Parameters

Posted on 2014-02-11
6
274 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 101

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 101

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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