×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Using a Running Total as a Parameter

Using a Running Total as a Parameter

Using a Running Total as a Parameter

(OP)
Hi. My report lists a bunch of applications and each application should have one, or many, decisions. The user wants to be able to list the applications that do NOT have any decisions. What I was thinking of doing, was creating a running total of the decisions (therefore I get the ones that have "0") and then create a parameter where the user can query where those are 0. But I can't seem to get a parameter to run off a running total field? Is this something I "can" do, or is there a better way??
Thanks for the advice!

RE: Using a Running Total as a Parameter

How is a decision represented in the database? Is there a field called decision? Is it null when there are no decisions? Or does it contain some other value if there is no decision? Maybe show a mockup of some data that shows some different scenarios.

If the field is null when there is no decision, then you could create a formula like this:

//{@nulldecision}:
If isnull({table.decision}} then 0 else 1

Insert a group on {table.applicationID}. Then you could go to report->selection formulas->GROUP and enter:

Sum({@nulldecision}, {table.applicationID)=0

This would display only those apps with no decision.

-LB

RE: Using a Running Total as a Parameter

(OP)
That's great lbass and it works, but how can I make that a parameter? The user wants to be able to select a parameter to sometimes look at only those without the decision, and sometimes wants to look at those With the decision... and sometimes all of them.

RE: Using a Running Total as a Parameter

(OP)
Oh I think I got it. I removed the Sum({@nulldecision}, {table.applicationID)=0 from the group selection and built a parameter called Decisions.
Then in the record selection I put:
(if {?Decisions} = "No Decision" then {@nulldecision} = 0
else if {?Decisions} = "Has Decision" then {@nulldecision} = 1
else if {?Decisions} = "ALL" then ({@nulldecision}= 0 or {@nulldecision}= 1))

This works.
Thanks so much lbass!!

RE: Using a Running Total as a Parameter

If it is possible for an application to have both a null decision and a non-null decision, your solution will not work, since any application that includes st least one null decision will be returned when you select “No Decision”. That’s why I asked for sample data. Based on your formula, it appears that an application can have nulls AND data in the field. So my first solution still applies, but with the addition of a parameter, the group selection formula would look like this:

(
{?Decision}=“No Decision” and
Sum({@nulldecision},{table.application})=0
) or
(
{?Decision}=“Has Decision” and
Sum({@nulldecision},{table.application})<>0
) or
{?Decision}=“All”

Apologies for neglecting to add in the parameter earlier. Be sure to replace the quotes in my post with your own, as the quotes from my iPad will throw an error.

-LB

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close