Solved

Running Total based on Parameters

Posted on 2014-02-11
6
251 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Holy Shit...
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

10 Experts available now in Live!

Get 1:1 Help Now